:root {
  color-scheme: light;
  --page-bg: #eef2f6;
  --ink: #172033;
  --muted: #607086;
  --panel: #ffffff;
  --line: #d8dee8;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.page {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.docs-header {
  align-items: center;
}

.lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.docs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.docs-links a {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #253249;
  font-weight: 700;
  text-decoration: none;
}

.docs-links a:hover {
  border-color: var(--accent);
  color: #0b5d56;
}

.docs-band {
  margin: 18px 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.quickstart-band {
  border-top: 0;
  padding-top: 0;
}

.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quickstart-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.quickstart-grid h2,
.docs-copy h2,
.settings-band h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

pre {
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid #253249;
  border-radius: 8px;
  background: #111827;
  color: #e5edf8;
  font-size: 13px;
  line-height: 1.55;
}

pre + pre {
  margin-top: 12px;
}

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

.docs-copy {
  max-width: 980px;
}

.settings-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

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

.settings-table th {
  background: #f8fafc;
  color: #253249;
  font-size: 12px;
  text-transform: uppercase;
}

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

.topbar h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.skin-section {
  margin-top: 18px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
}

.skin-switcher-section {
  border-top: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.case-card h3 {
  margin: 0 0 12px;
  color: #2f3a4f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.case-card-wide {
  grid-column: 1 / -1;
}

.theme-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.theme-buttons button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #253249;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.theme-buttons button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #0b5d56;
}

.settings-preview {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.activity {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.activity h2 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0;
}

.activity p {
  margin: 5px 0;
  color: #334155;
  font-size: 13px;
}

.option-row,
.swatch-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.option-row small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.custom-skin-sample {
  --stackline-ms-primary: #b45309;
  --stackline-ms-primary-soft: rgba(180, 83, 9, 0.14);
  --stackline-ms-surface: #fffaf0;
  --stackline-ms-surface-soft: #fffbeb;
  --stackline-ms-surface-muted: #fef3c7;
  --stackline-ms-outline: #fcd34d;
  --stackline-ms-outline-strong: #b45309;
  --stackline-ms-on-surface: #2f1b05;
  --stackline-ms-on-surface-muted: #7c5b2e;
  --stackline-ms-chip-bg: #fef3c7;
  --stackline-ms-chip-text: #92400e;
  --stackline-ms-chip-remove: #92400e;
  --stackline-ms-divider: rgba(180, 83, 9, 0.18);
  --stackline-ms-section-bg: #fffbeb;
}

.custom-skin-sample .stackline-dropdown.theme-brand {
  --stackline-ms-primary: #7c3aed;
  --stackline-ms-primary-soft: rgba(124, 58, 237, 0.14);
  --stackline-ms-surface: #ffffff;
  --stackline-ms-surface-soft: #f5f3ff;
  --stackline-ms-surface-muted: #ede9fe;
  --stackline-ms-outline: #c4b5fd;
  --stackline-ms-outline-strong: #7c3aed;
  --stackline-ms-on-surface: #22183f;
  --stackline-ms-on-surface-muted: #6b5d80;
  --stackline-ms-chip-bg: #ede9fe;
  --stackline-ms-chip-text: #5b21b6;
  --stackline-ms-chip-remove: #5b21b6;
  --stackline-ms-divider: rgba(124, 58, 237, 0.16);
  --stackline-ms-section-bg: #faf5ff;
}

.skin-section[data-theme="dark"] .case-card {
  border-color: #273142;
  background: #111722;
}

.skin-section[data-theme="dark"] .case-card h3 {
  color: #edf2f7;
}

.skin-section[data-theme="dark"] {
  padding-inline: 18px;
  border-radius: 10px;
  background: #0f141d;
}

.skin-section[data-theme="dark"] .section-heading h2 {
  color: #edf2f7;
}

@media (max-width: 1024px) {
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 20px, 1480px);
    padding-top: 14px;
  }

  .topbar,
  .section-heading {
    display: block;
  }

  .docs-links {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .quickstart-grid {
    grid-template-columns: 1fr;
  }

  .case-grid {
    grid-template-columns: 1fr;
  }
}
