/* LatenTX public documentation: same sage light and green dark palette as the homepage. */
:root {
  color-scheme: light;
  --background: #f1f5f0;
  --foreground: #172d29;
  --muted: #52675f;
  --surface: #fbfdfb;
  --border: #d6e2da;
  --code-bg: #e5ede7;
  --primary: #166c52;
  --primary-foreground: #ffffff;
  --page-glow:
    radial-gradient(60rem 40rem at 82% 0%, #cfeedd 0%, transparent 62%),
    radial-gradient(44rem 32rem at 4% 0%, #eef5d9 0%, transparent 60%);
}
:root.dark {
  color-scheme: dark;
  --background: #111b18;
  --foreground: #e4eee8;
  --muted: #a6b9ae;
  --surface: #17231d;
  --border: #304337;
  --code-bg: #1e2b25;
  --primary: #95dfba;
  --primary-foreground: #112c20;
  --page-glow: radial-gradient(
    60rem 40rem at 82% 0%,
    #95dfba14 0%,
    transparent 62%
  );
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  color: var(--foreground);
  background: var(--page-glow), var(--background);
  background-attachment: fixed;
  font:
    15px/1.8 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 4px;
  border-radius: 4px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 30;
  padding: 8px 16px;
  background: var(--background);
}
.skip-link:focus {
  top: 8px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 65px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1280px;
  height: 100%;
  margin: auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -0.4px;
}
.brand img {
  border-radius: 8px;
}
.header-divider {
  height: 20px;
  width: 1px;
  background: var(--border);
}
.docs-label {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.site-header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.site-header nav a {
  text-decoration: none;
}
.console-link {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 6px 13px;
  border-radius: 8px;
}
.docs-layout {
  max-width: 1280px;
  margin: auto;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 56px;
  padding: 0 28px;
}
.docs-sidebar {
  position: sticky;
  top: 65px;
  align-self: start;
  height: calc(100vh - 65px);
  overflow: auto;
  padding: 36px 20px 32px 0;
  border-right: 1px solid var(--border);
  font-size: 13px;
}
.nav-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 12px 12px;
  letter-spacing: 0.08em;
}
.docs-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 30px;
}
.docs-sidebar nav a {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
}
.docs-sidebar nav a:hover,
.docs-sidebar nav a[aria-current='page'] {
  background: var(--surface);
  color: var(--foreground);
}
.docs-sidebar nav a[aria-current='page'] {
  font-weight: 600;
  color: var(--primary);
  box-shadow: inset 2px 0 0 var(--primary);
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}
.theme-toggle:hover {
  background: var(--surface);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}
.sidebar-note {
  padding: 24px 12px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.docs-main {
  min-width: 0;
  max-width: 900px;
  padding: 44px 0 64px;
}
.eyebrow {
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}
h1 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1.25;
  margin: 0 0 22px;
}
h2 {
  font-size: 24px;
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.4;
  margin: 48px 0 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
h3 {
  font-size: 18px;
  margin: 28px 0 12px;
  font-weight: 600;
}
p,
li {
  overflow-wrap: anywhere;
}
p {
  margin: 14px 0;
}
li {
  margin: 6px 0;
}
pre {
  padding: 20px;
  background: var(--surface);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
  font:
    12px/1.75 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  max-width: 100%;
}
code {
  font:
    0.9em ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  background: var(--code-bg);
  border-radius: 4px;
  padding: 2px 5px;
}
pre code {
  background: transparent;
  padding: 0;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
  margin: 16px 0 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
}
th,
td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
  min-width: 0;
}
th {
  background: var(--surface);
  font-weight: 600;
}
tr:last-child td {
  border-bottom: 0;
}
.method {
  font-weight: 650;
  white-space: nowrap;
}
.note {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px 20px;
  margin: 24px 0;
}
.warn {
  border-left: 3px solid #a78543;
}
.muted {
  color: var(--muted);
}
.quickstart-lead {
  color: var(--muted);
  font-size: 18px;
}
.quickstart-path {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 28px 0 16px;
  list-style: none;
}
.quickstart-path li {
  margin: 0;
}
.quickstart-path a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  text-decoration: none;
}
.quickstart-path span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.quickstart-key-step,
.docs-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}
.docs-screenshot {
  margin: 24px 0;
}
.docs-screenshot a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.docs-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}
.docs-screenshot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.docs-overview {
  margin: 24px 0 32px;
}
.docs-overview > p {
  color: var(--muted);
}
.docs-overview .docs-screenshot:last-child {
  margin-bottom: 0;
}
.quickstart-key-step .docs-screenshot {
  margin-top: 14px;
}
@media (max-width: 640px) {
  .quickstart-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quickstart-path a {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }
  .quickstart-path li:last-child {
    grid-column: 1 / -1;
  }
  .quickstart-key-step,
  .docs-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
.toc {
  columns: 2;
  column-gap: 28px;
}
.toc li {
  break-inside: avoid;
}
.docs-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px;
    padding: 0 20px;
  }
  .header-inner {
    padding: 0 20px;
  }
}
@media (max-width: 680px) {
  .header-inner {
    gap: 12px;
    padding: 0 16px;
  }
  .site-header nav {
    gap: 12px;
  }
  .site-header nav a[href='/private-deployment'],
  .site-header nav a[href='/about'] {
    display: none;
  }
  .site-header nav a {
    white-space: nowrap;
  }
  .docs-label,
  .header-divider {
    display: none;
  }
  .docs-layout {
    display: block;
    padding: 0 16px;
  }
  .docs-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
  }
  .docs-sidebar .nav-label,
  .sidebar-note,
  .docs-sidebar nav[aria-label='开发资源'] {
    display: none;
  }
  .docs-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
  }
  .docs-sidebar nav a {
    padding: 5px 10px;
    font-size: 12px;
  }
  .docs-main {
    padding-top: 28px;
  }
  .toc {
    columns: 1;
  }
  th,
  td {
    padding: 9px 8px;
    font-size: 12px;
  }
  pre {
    padding: 14px;
  }
  h2 {
    font-size: 22px;
  }
}

/* Developer Skill onboarding shares the documentation theme. */
.skill-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.skill-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.skill-card h3 {
  margin-top: 0;
}
.skill-card details {
  margin: 1rem 0;
}
.skill-card summary {
  cursor: pointer;
}
.skill-card textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 15rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  color: inherit;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
}
.skill-card button {
  cursor: pointer;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font: inherit;
}
.skill-card button:focus-visible,
.skill-card summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.skill-card [role='status'] {
  display: block;
  font-size: 12px;
  margin-top: 0.6rem;
}
@media (max-width: 640px) {
  .skill-cards {
    grid-template-columns: 1fr;
  }
}
