@import "./assets/fonts/harmony/sc-medium/result.css";
@import "./assets/fonts/harmony/sc-bold/result.css";

:root {
  color-scheme: light;
  --bg: #eef0ec;
  --surface: #f9faf7;
  --surface-strong: #ffffff;
  --ink: #141714;
  --muted: #687069;
  --line: rgba(20, 23, 20, 0.14);
  --line-strong: rgba(20, 23, 20, 0.3);
  --accent: #d8ff38;
  --accent-strong: #a9cc14;
  --code-bg: #151916;
  --code-ink: #ecf4e7;
  --shadow: 0 18px 48px rgba(19, 24, 18, 0.1);
  --font-sans: "Harmony Sans App", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  font-family: var(--font-sans);
  font-synthesis: none;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101310;
  --surface: #171b17;
  --surface-strong: #1d221d;
  --ink: #f1f5ed;
  --muted: #9ca59d;
  --line: rgba(231, 239, 229, 0.13);
  --line-strong: rgba(231, 239, 229, 0.3);
  --accent-strong: #d8ff38;
  --code-bg: #090b09;
  --code-ink: #eff8e7;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, transparent 49.8%, color-mix(in srgb, var(--ink), transparent 97%) 50%, transparent 50.2%) 0 0 / 80px 80px,
    var(--bg);
  color: var(--ink);
  font-weight: 600;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 3px;
}

.docs-header {
  color: #f8faf5;
  background:
    radial-gradient(circle at 78% 35%, rgba(216, 255, 56, 0.17), transparent 23%),
    linear-gradient(112deg, #0e100f, #1d211e 70%, #293129);
}

.docs-topbar,
.docs-hero,
.docs-layout,
.docs-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.docs-topbar {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.docs-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.docs-brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 17px;
  font-weight: 900;
}

.docs-brand strong,
.docs-brand small {
  display: block;
  letter-spacing: 0.12em;
}

.docs-brand small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
}

.docs-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.docs-actions > a {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: inherit;
  font-size: 11px;
  text-decoration: none;
}

.docs-actions .theme-trigger {
  color: #fff;
}

.docs-hero {
  padding-block: 74px 70px;
}

.docs-kicker,
.section-label {
  margin: 0;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.docs-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.docs-hero > p:not(.docs-kicker) {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  line-height: 1.8;
}

.endpoint-line {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
}

.endpoint-line strong {
  display: grid;
  padding: 12px 15px;
  place-items: center;
  background: var(--accent);
  color: #111311;
  font-size: 12px;
}

.endpoint-line code {
  padding: 12px 15px;
  overflow-x: auto;
  font: 700 13px/1.4 Consolas, "Courier New", monospace;
  white-space: nowrap;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.button {
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 11px;
  text-decoration: none;
}

.button.primary {
  border-color: var(--accent);
  background: rgba(216, 255, 56, 0.12);
}

.docs-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
  padding-block: 58px 80px;
}

.docs-toc {
  position: sticky;
  top: 24px;
  display: grid;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.docs-toc strong {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.docs-toc a {
  padding: 7px 0;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--accent-strong);
}

.docs-content {
  min-width: 0;
}

.docs-content section {
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
}

.docs-content section:first-child {
  padding-top: 0;
  border-top: 0;
}

.docs-content h2 {
  margin: 7px 0 18px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.docs-content h3 {
  margin: 27px 0 10px;
  font-size: 15px;
}

.docs-content p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

code {
  font-family: Consolas, "Courier New", monospace;
}

p code,
td code,
th code {
  padding: 2px 5px;
  background: color-mix(in srgb, var(--ink), transparent 92%);
  color: var(--ink);
  font-size: 0.92em;
}

pre {
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
  border-left: 4px solid var(--accent-strong);
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--shadow);
}

pre code {
  font-size: 12px;
  line-height: 1.7;
}

.callout {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent-strong);
  background: color-mix(in srgb, var(--accent), var(--surface) 90%);
}

.callout p {
  margin-bottom: 0;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 12px;
}

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

th {
  background: color-mix(in srgb, var(--ink), transparent 94%);
  font-size: 10px;
  letter-spacing: 0.08em;
}

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

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

.docs-footer {
  display: flex;
  justify-content: space-between;
  padding-block: 24px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

@media (max-width: 800px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .docs-toc {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 12px;
  }

  .docs-toc strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .docs-topbar,
  .docs-hero,
  .docs-layout,
  .docs-footer {
    width: calc(100% - 28px);
  }

  .docs-actions > a:nth-child(2) {
    display: none;
  }

  .docs-hero {
    padding-block: 56px 52px;
  }

  .endpoint-line {
    width: 100%;
  }

  .endpoint-line code {
    min-width: 0;
  }

  .download-actions,
  .download-actions .button {
    width: 100%;
  }

  .button {
    text-align: center;
  }

  .docs-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-content section {
    padding-block: 29px 37px;
  }

  .docs-footer {
    gap: 8px;
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
}

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