@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Kanit:wght@600;700;800&display=swap');

:root {
  --bg: #0f0f14;
  --bg-deep: #08080b;
  --panel: rgba(22, 22, 28, 0.92);
  --panel-strong: #191920;
  --panel-soft: rgba(238, 151, 141, 0.08);
  --card: rgba(255, 255, 255, 0.065);
  --card-hover: rgba(255, 255, 255, 0.1);
  --text: #f4f3f6;
  --heading: #ffffff;
  --muted: #aaa6b3;
  --subtle: #7d7886;
  --accent: #ee978d;
  --accent-strong: #d4746b;
  --accent-soft: rgba(238, 151, 141, 0.16);
  --blue: #4f7cff;
  --mint: #00bfa6;
  --orange: #ff8a1f;
  --purple: #8b5cf6;
  --gold: #f6c945;
  --green: #29d398;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 16px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font: "Kanit", "Inter", ui-sans-serif, system-ui, sans-serif;
}

html[data-theme="light"] {
  --bg: #fbfbfd;
  --bg-deep: #f5f5f8;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --panel-soft: rgba(197, 112, 101, 0.06);
  --card: #ffffff;
  --card-hover: #f7f7fb;
  --text: #25252d;
  --heading: #17171f;
  --muted: #6d6a76;
  --subtle: #8b8794;
  --accent: #c57065;
  --accent-strong: #a9544b;
  --accent-soft: rgba(197, 112, 101, 0.12);
  --gold: #b97900;
  --green: #00896f;
  --line: #ececf2;
  --line-strong: #dedee8;
  --shadow: 0 24px 70px rgba(22, 22, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(238, 151, 141, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 151, 141, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 78% 8%, rgba(238, 151, 141, 0.14), transparent 28rem),
    radial-gradient(circle at 18% 18%, rgba(79, 124, 255, 0.11), transparent 30rem),
    linear-gradient(180deg, #14141b 0%, var(--bg) 48%, var(--bg-deep) 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

html[data-theme="light"] body {
  background:
    linear-gradient(rgba(197, 112, 101, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197, 112, 101, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 82% 8%, rgba(197, 112, 101, 0.08), transparent 30rem),
    radial-gradient(circle at 14% 18%, rgba(79, 124, 255, 0.08), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, #fbfbfd 48%, #f6f6fa 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}

body.nav-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.docs-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(18px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 15, 20, 0.78);
  backdrop-filter: blur(20px);
}

html[data-theme="light"] .docs-topbar {
  background: rgba(255, 255, 255, 0.86);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  font-weight: 800;
  color: var(--heading);
}

.brand img {
  width: 128px;
  height: auto;
  display: block;
}

.brand strong {
  display: none;
  color: var(--heading);
  font-family: var(--display-font);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand.logo-missing img {
  display: none;
}

.brand.logo-missing strong {
  display: inline-block;
}

.brand span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
}

.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.mobile-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
  transition: opacity 160ms ease, transform 160ms ease;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--subtle);
}

.search-wrap span {
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-wrap input::placeholder {
  color: var(--subtle);
}

.language-select {
  display: none;
}

.language-button,
.theme-toggle,
.app-link {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  padding: 0 16px;
  font-weight: 750;
}

.language-button,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.language-button:hover,
.theme-toggle:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset -4px -4px 0 rgba(42, 17, 17, 0.44);
}

html[data-theme="light"] .search-wrap,
html[data-theme="light"] .language-button,
html[data-theme="light"] .theme-toggle {
  background: #ffffff;
}

.app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d4746b, #ffb6aa);
  color: #2a1111;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(212, 116, 107, 0.22);
  white-space: nowrap;
}

.nav-scrim {
  display: none;
}

.docs-sidebar {
  position: sticky;
  top: 69px;
  height: calc(100vh - 69px);
  overflow: auto;
  padding: 22px 14px 36px 24px;
  border-right: 1px solid var(--line);
  background: rgba(15, 15, 20, 0.76);
  backdrop-filter: blur(16px);
}

html[data-theme="light"] .docs-sidebar {
  background: rgba(255, 255, 255, 0.74);
}

.sidebar-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.12);
}

.sidebar-eyebrow,
.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sidebar-card h1 {
  margin: 0;
  color: var(--heading);
  font-family: var(--display-font);
  font-size: 22px;
  line-height: 1.08;
}

.sidebar-card p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

#docs-nav {
  display: grid;
  gap: 2px;
  margin-top: 14px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 10px 6px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-group-icon,
.nav-link-icon {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  flex: 0 0 auto;
}

.nav-group-icon {
  width: 16px;
  height: 16px;
  opacity: 0.82;
}

.nav-link-icon {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  background: var(--accent-soft);
  opacity: 0.94;
}

.nav-group-icon svg,
.nav-link-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-link-label {
  min-width: 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--heading);
  border-color: var(--line);
  background: var(--card);
}

.nav-link:hover .nav-link-icon,
.nav-link.active .nav-link-icon {
  color: var(--heading);
}

.nav-link small {
  justify-self: end;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 800;
}

.docs-main {
  display: grid;
  grid-template-columns: minmax(0, 1180px) minmax(190px, 220px);
  gap: 24px;
  align-items: start;
  justify-content: center;
  min-width: 0;
  padding: clamp(26px, 4vw, 56px);
}

.doc-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

html[data-theme="light"] .doc-section,
html[data-theme="light"] .sidebar-card {
  background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] .doc-card,
html[data-theme="light"] .step-card,
html[data-theme="light"] .table-wrap {
  background: #ffffff;
}

html[data-theme="light"] .doc-grid .doc-card:nth-child(5n+1) {
  background: #fff0fb;
  border-color: #f7d8ef;
}

html[data-theme="light"] .doc-grid .doc-card:nth-child(5n+2) {
  background: #eef4ff;
  border-color: #dce7ff;
}

html[data-theme="light"] .doc-grid .doc-card:nth-child(5n+3) {
  background: #eafaf6;
  border-color: #d3efe8;
}

html[data-theme="light"] .doc-grid .doc-card:nth-child(5n+4) {
  background: #fff5e9;
  border-color: #f5e2cc;
}

html[data-theme="light"] .doc-grid .doc-card:nth-child(5n+5) {
  background: #f5f0ff;
  border-color: #e8ddff;
}

.doc-grid .doc-card:nth-child(5n+1) {
  background: rgba(238, 151, 141, 0.09);
  border-color: rgba(238, 151, 141, 0.22);
}

.doc-grid .doc-card:nth-child(5n+2) {
  background: rgba(79, 124, 255, 0.09);
  border-color: rgba(79, 124, 255, 0.2);
}

.doc-grid .doc-card:nth-child(5n+3) {
  background: rgba(0, 191, 166, 0.08);
  border-color: rgba(0, 191, 166, 0.2);
}

.doc-grid .doc-card:nth-child(5n+4) {
  background: rgba(255, 138, 31, 0.08);
  border-color: rgba(255, 138, 31, 0.2);
}

.doc-grid .doc-card:nth-child(5n+5) {
  background: rgba(139, 92, 246, 0.09);
  border-color: rgba(139, 92, 246, 0.2);
}

.docs-content {
  display: grid;
  grid-column: 1;
  gap: 22px;
  width: 100%;
  max-width: 1180px;
  margin: 0;
  min-width: 0;
}

.docs-page-toc {
  position: sticky;
  top: 96px;
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 16px 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.docs-page-toc[hidden] {
  display: none;
}

.toc-eyebrow {
  margin: 0 0 12px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.docs-page-toc nav {
  display: grid;
  gap: 4px;
}

.docs-toc-link {
  position: relative;
  display: block;
  padding: 7px 10px 7px 16px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.docs-toc-link::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--subtle);
  opacity: .55;
  transition: height 180ms ease, background 180ms ease, opacity 180ms ease, top 180ms ease;
}

.docs-toc-link[data-toc-level="2"] {
  padding-left: 22px;
  font-size: 11px;
  color: var(--subtle);
}

.docs-toc-link:hover,
.docs-toc-link.is-active {
  color: var(--heading);
  background: var(--accent-soft);
  transform: translateX(3px);
}

.docs-toc-link.is-active::before {
  top: 8px;
  height: 14px;
  background: var(--accent);
  opacity: 1;
}

.toc-target {
  scroll-margin-top: 98px;
}

.doc-section {
  scroll-margin-top: 92px;
  padding: clamp(20px, 3vw, 34px);
  min-width: 0;
}

.doc-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.doc-header h3 {
  margin: 0;
  color: var(--heading);
  font-family: var(--display-font);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.doc-header p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 850px;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.doc-grid,
.mini-grid,
.faq-grid {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.doc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.faq-grid {
  margin-top: 20px;
}

.doc-card,
.step-card,
.callout,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  min-width: 0;
}

.doc-card,
.step-card,
.callout {
  padding: 18px;
}

.doc-card h4,
.step-card h4,
.callout h4 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 17px;
}

.doc-card p,
.step-card p,
.callout p,
.doc-list li {
  color: var(--muted);
  line-height: 1.65;
}

.doc-card p,
.step-card p,
.callout p {
  margin: 0;
}

.doc-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.step-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  counter-reset: step;
}

.step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  font-weight: 800;
}

.callout {
  margin-top: 20px;
  border-color: rgba(238, 151, 141, 0.24);
  background: linear-gradient(135deg, rgba(238, 151, 141, 0.11), rgba(79, 124, 255, 0.07));
}

.callout strong {
  color: var(--accent);
}

.table-wrap {
  margin-top: 20px;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  line-height: 1.55;
}

td strong,
td a {
  color: var(--heading);
}

td a {
  font-weight: 900;
}

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

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
}

.doc-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 2px;
}

.doc-pager-card {
  position: relative;
  display: grid;
  min-height: 76px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--heading);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.1);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

html[data-theme="light"] .doc-pager-card {
  background: #ffffff;
}

.doc-pager-card:not(.is-empty):hover {
  border-color: rgba(212, 116, 107, 0.34);
  background: linear-gradient(135deg, rgba(238, 151, 141, 0.1), rgba(79, 124, 255, 0.07));
  box-shadow: 0 24px 70px rgba(212, 116, 107, 0.12);
  transform: translateY(-1px);
}

.doc-pager-card.is-prev {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  column-gap: 12px;
}

.doc-pager-card.is-next {
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  justify-items: end;
  text-align: right;
  column-gap: 12px;
}

.doc-pager-card.is-empty {
  visibility: hidden;
}

.doc-pager-card span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--subtle);
  font-size: 28px;
  line-height: 1;
}

.doc-pager-card small {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doc-pager-card strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.docs-modal[hidden] {
  display: none;
}

.docs-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  padding: clamp(18px, 8vh, 72px) 18px 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 8, 11, 0.72);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

html[data-theme="light"] .modal-backdrop {
  background: rgba(22, 22, 36, 0.24);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(78vh, 740px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(25, 25, 32, 0.98), rgba(12, 12, 16, 0.98));
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.44);
  padding: clamp(18px, 3vw, 28px);
}

html[data-theme="light"] .modal-card {
  background: #ffffff;
  box-shadow: 0 32px 100px rgba(115, 58, 52, 0.22);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.modal-eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.05;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--heading);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.modal-search-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 0 18px;
  font-weight: 700;
}

html[data-theme="light"] .modal-search-input {
  background: #fbfbfd;
}

.modal-search-input::placeholder {
  color: var(--subtle);
}

.modal-hint {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.search-results,
.language-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.search-result,
.language-option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}

html[data-theme="light"] .search-result,
html[data-theme="light"] .language-option {
  background: #ffffff;
}

.search-result:hover,
.language-option:hover,
.language-option.is-active {
  border-color: var(--line-strong);
  background: var(--card-hover);
}

.search-result strong,
.language-option strong {
  display: block;
  color: var(--heading);
  font-size: 16px;
}

.search-result span,
.language-option span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.search-result small {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.empty-state {
  display: none;
  margin: 0 auto;
  max-width: 720px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--panel);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4746b, #ffb6aa);
  color: #2a1111;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.to-top {
  font-size: 0;
}

.to-top::before {
  content: "↑";
  font-size: 20px;
}

@media (max-width: 1500px) {
  .docs-main {
    grid-template-columns: minmax(0, 1180px);
  }

  .docs-page-toc {
    display: none !important;
  }
}

@media (max-width: 1080px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  }

  .mobile-nav-toggle {
    display: block;
  }

  body.nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .app-link {
    display: none;
  }

  .nav-scrim {
    position: fixed;
    inset: 69px 0 0 min(82vw, 316px);
    z-index: 45;
    display: block;
    border: 0;
    background: rgba(8, 8, 11, 0.46);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(3px);
    transition: opacity 180ms ease;
  }

  html[data-theme="light"] .nav-scrim {
    background: rgba(20, 20, 30, 0.2);
  }

  body.nav-open .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .docs-sidebar {
    position: fixed;
    inset: 69px auto 0 0;
    z-index: 50;
    width: min(82vw, 316px);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    border-right-color: var(--line-strong);
    background: rgba(15, 15, 20, 0.96);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.22);
  }

  html[data-theme="light"] .docs-sidebar {
    background: rgba(255, 255, 255, 0.97);
  }

  body.nav-open .docs-sidebar {
    transform: translateX(0);
  }

}

@media (max-width: 780px) {
  .docs-topbar {
    grid-template-columns: auto auto 1fr auto;
    gap: 10px;
    padding: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 112px;
  }

  .brand span {
    display: none;
  }

  .search-wrap {
    grid-column: 1 / -1;
    order: 4;
  }

  .language-button,
  .theme-toggle {
    min-height: 40px;
    padding: 0 11px;
    font-size: 12px;
  }

  .docs-sidebar {
    top: 116px;
    height: calc(100vh - 116px);
  }

  .nav-scrim {
    inset: 116px 0 0 min(82vw, 316px);
  }

  .docs-main {
    padding: 18px 12px 46px;
  }

  .doc-section {
    border-radius: 16px;
  }

  .doc-header {
    grid-template-columns: 1fr;
  }

  .doc-grid,
  .mini-grid,
  .doc-pager {
    grid-template-columns: 1fr;
  }

  .doc-pager-card.is-empty {
    display: none;
  }

  .step-card {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 620px;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 36px);
    border-radius: 18px;
  }
}
/* App return link refinements */
.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.brand {
  min-width: 0;
}

.docs-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  white-space: nowrap;
}

.docs-pill:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
}

.app-link-short {
  display: none;
}

@media (max-width: 1080px) {
  .docs-topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto auto auto;
  }

  .app-link {
    display: inline-flex;
  }
}

@media (max-width: 780px) {
  .docs-topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
  }

  .brand-cluster {
    order: 1;
    grid-column: 1;
    min-width: 0;
    gap: 8px;
  }

  .mobile-nav-toggle {
    order: 2;
    grid-column: 2;
  }

  .app-link {
    order: 3;
    grid-column: 3;
    min-height: 40px;
    padding: 0 14px;
  }

  .search-wrap {
    order: 4;
    grid-column: 1;
    min-width: 0;
  }

  .search-wrap span {
    display: none;
  }

  .theme-toggle {
    order: 5;
    grid-column: 2;
  }

  .language-button {
    order: 6;
    grid-column: 3;
  }

  .brand img {
    width: 108px;
  }

  .docs-pill {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 10px;
  }

  .app-link-long {
    display: none;
  }

  .app-link-short {
    display: inline;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: 98px;
  }

  .brand-cluster {
    gap: 6px;
  }

  .theme-toggle [data-theme-label] {
    display: none;
  }

  .theme-toggle {
    width: 40px;
    padding: 0;
  }

  .language-button {
    min-width: 48px;
    padding: 0 9px;
  }

  .language-button [data-lang-label] {
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-link {
    min-width: 52px;
    padding: 0 12px;
  }
}
@media (max-width: 780px) {
  .docs-sidebar {
    top: 121px;
    height: calc(100vh - 121px);
  }

  .nav-scrim {
    inset: 121px 0 0 min(82vw, 316px);
  }
}
/* ── Contract-transparency code blocks (docs "code" block type) ─────────── */
.code-block {
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.code-block figcaption {
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
}

.code-block code {
  display: block;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--text);
  white-space: pre;
}

.code-block .code-label {
  color: var(--muted);
}

.code-block a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-soft);
}

.code-block a:hover {
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}
