/* Cody Shen shared design system — Apple HIG feel.
   Tokens live on :root. Components are opt-in via .ds-* classes.
   Document chrome (body type/bg) is opt-in via .ds-page on <html> or <body>.
   Light/dark: prefers-color-scheme and [data-theme="dark"|"light"] override.
   https://codyshen0000.github.io/assets/ds.css
*/

:root {
  --ds-font-sans: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --ds-font-display: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --ds-font-mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --ds-text-xs: 12px;
  --ds-text-sm: 14px;
  --ds-text-body: 17px;
  --ds-text-lg: 21px;
  --ds-text-xl: 28px;
  --ds-text-2xl: 40px;
  --ds-text-3xl: 56px;
  --ds-text-display: clamp(40px, 7vw, 80px);

  --ds-leading-none: 1;
  --ds-leading-tight: 1.05;
  --ds-leading-snug: 1.2;
  --ds-leading-body: 1.47059;
  --ds-leading-prose: 1.55;
  --ds-tracking-display: -0.03em;
  --ds-tracking-tight: -0.022em;
  --ds-tracking-body: -0.022em;
  --ds-tracking-caps: 0.06em;

  --ds-bg: #f5f5f7;
  --ds-bg-elevated: #ffffff;
  --ds-surface: #f5f5f7;
  --ds-surface-2: #ffffff;
  --ds-surface-3: #e8e8ed;
  --ds-text: #1d1d1f;
  --ds-text-secondary: #6e6e73;
  --ds-text-tertiary: #86868b;
  --ds-hairline: rgba(0, 0, 0, 0.08);
  --ds-hairline-strong: rgba(0, 0, 0, 0.16);
  --ds-overlay: rgba(0, 0, 0, 0.48);
  --ds-nav-bg: rgba(245, 245, 247, 0.72);
  --ds-accent: #0071e3;
  --ds-accent-hover: #0077ed;
  --ds-accent-active: #006edb;
  --ds-accent-soft: rgba(0, 113, 227, 0.1);
  --ds-accent-ink: #ffffff;
  --ds-link-pill-bg: rgba(0, 0, 0, 0.05);
  --ds-link-pill-bg-hover: rgba(0, 0, 0, 0.09);

  --ds-radius-sm: 12px;
  --ds-radius-md: 18px;
  --ds-radius-lg: 28px;
  --ds-radius-pill: 980px;

  --ds-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --ds-shadow-2: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --ds-shadow-3: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  --ds-shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.06);

  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 24px;
  --ds-space-6: 32px;
  --ds-space-7: 48px;
  --ds-space-8: 64px;
  --ds-space-9: 96px;
  --ds-space-10: 128px;

  --ds-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ds-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ds-duration: 250ms;

  --ds-nav-h: 52px;
  --ds-max: 980px;
  --ds-prose: 70ch;
  --ds-gutter: 22px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ds-bg: #000000;
    --ds-bg-elevated: #1c1c1e;
    --ds-surface: #1c1c1e;
    --ds-surface-2: #1c1c1e;
    --ds-surface-3: #2c2c2e;
    --ds-text: #f5f5f7;
    --ds-text-secondary: #a1a1a6;
    --ds-text-tertiary: #86868b;
    --ds-hairline: rgba(255, 255, 255, 0.12);
    --ds-hairline-strong: rgba(255, 255, 255, 0.22);
    --ds-overlay: rgba(0, 0, 0, 0.64);
    --ds-nav-bg: rgba(0, 0, 0, 0.72);
    --ds-accent: #2997ff;
    --ds-accent-hover: #4aa3ff;
    --ds-accent-active: #1484f0;
    --ds-accent-soft: rgba(41, 151, 255, 0.16);
    --ds-accent-ink: #000000;
    --ds-link-pill-bg: rgba(255, 255, 255, 0.08);
    --ds-link-pill-bg-hover: rgba(255, 255, 255, 0.14);
    --ds-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.28);
    --ds-shadow-2: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.28);
    --ds-shadow-3: 0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.32);
    --ds-shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.56), 0 6px 16px rgba(0, 0, 0, 0.36);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ds-bg: #000000;
  --ds-bg-elevated: #1c1c1e;
  --ds-surface: #1c1c1e;
  --ds-surface-2: #1c1c1e;
  --ds-surface-3: #2c2c2e;
  --ds-text: #f5f5f7;
  --ds-text-secondary: #a1a1a6;
  --ds-text-tertiary: #86868b;
  --ds-hairline: rgba(255, 255, 255, 0.12);
  --ds-hairline-strong: rgba(255, 255, 255, 0.22);
  --ds-overlay: rgba(0, 0, 0, 0.64);
  --ds-nav-bg: rgba(0, 0, 0, 0.72);
  --ds-accent: #2997ff;
  --ds-accent-hover: #4aa3ff;
  --ds-accent-active: #1484f0;
  --ds-accent-soft: rgba(41, 151, 255, 0.16);
  --ds-accent-ink: #000000;
  --ds-link-pill-bg: rgba(255, 255, 255, 0.08);
  --ds-link-pill-bg-hover: rgba(255, 255, 255, 0.14);
  --ds-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.28);
  --ds-shadow-2: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.28);
  --ds-shadow-3: 0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.32);
  --ds-shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.56), 0 6px 16px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --ds-bg: #f5f5f7;
  --ds-bg-elevated: #ffffff;
  --ds-surface: #f5f5f7;
  --ds-surface-2: #ffffff;
  --ds-surface-3: #e8e8ed;
  --ds-text: #1d1d1f;
  --ds-text-secondary: #6e6e73;
  --ds-text-tertiary: #86868b;
  --ds-hairline: rgba(0, 0, 0, 0.08);
  --ds-hairline-strong: rgba(0, 0, 0, 0.16);
  --ds-overlay: rgba(0, 0, 0, 0.48);
  --ds-nav-bg: rgba(245, 245, 247, 0.72);
  --ds-accent: #0071e3;
  --ds-accent-hover: #0077ed;
  --ds-accent-active: #006edb;
  --ds-accent-soft: rgba(0, 113, 227, 0.1);
  --ds-accent-ink: #ffffff;
  --ds-link-pill-bg: rgba(0, 0, 0, 0.05);
  --ds-link-pill-bg-hover: rgba(0, 0, 0, 0.09);
  --ds-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --ds-shadow-2: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --ds-shadow-3: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  --ds-shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.06);
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ds-duration: 0.01ms;
  }
}

/* ---- opt-in document chrome ---- */
.ds-page {
  background: var(--ds-bg);
  color: var(--ds-text);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-body);
  font-weight: 400;
  line-height: var(--ds-leading-body);
  letter-spacing: var(--ds-tracking-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.ds-page {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ds-nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

html.ds-page,
html.ds-page body {
  margin: 0;
  min-height: 100%;
  background: var(--ds-bg);
  color: var(--ds-text);
}

.ds-page *,
.ds-page *::before,
.ds-page *::after {
  box-sizing: border-box;
}

.ds-page a {
  color: var(--ds-accent);
  text-decoration: none;
}

.ds-page a:hover {
  color: var(--ds-accent-hover);
}

.ds-page :focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.ds-page ::selection {
  background: var(--ds-accent);
  color: var(--ds-accent-ink);
}

@media (prefers-reduced-motion: reduce) {
  html.ds-page {
    scroll-behavior: auto;
  }
  .ds-page *,
  .ds-page *::before,
  .ds-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- layout ---- */
.ds-wrap {
  width: min(var(--ds-max), calc(100% - (var(--ds-gutter) * 2)));
  margin-inline: auto;
}

.ds-skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ds-text);
  color: var(--ds-bg);
  padding: 8px 12px;
  border-radius: var(--ds-radius-sm);
}

.ds-skip:focus {
  left: 8px;
  color: var(--ds-bg);
}

/* ---- frosted sticky nav ---- */
.ds-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--ds-nav-h);
  background: var(--ds-nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ds-duration) var(--ds-ease);
}

.ds-nav.scrolled,
.ds-nav.is-open {
  border-bottom-color: var(--ds-hairline);
}

.ds-nav-inner {
  width: min(var(--ds-max), calc(100% - (var(--ds-gutter) * 2)));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.ds-nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ds-text) !important;
  font-family: var(--ds-font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: var(--ds-tracking-tight);
  line-height: 1;
  white-space: nowrap;
}

.ds-nav-brand:hover {
  color: var(--ds-text) !important;
  opacity: 0.72;
}

.ds-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.ds-nav-links a {
  color: var(--ds-text-secondary) !important;
  transition: color var(--ds-duration) var(--ds-ease);
}

.ds-nav-links a:hover,
.ds-nav-links a.active {
  color: var(--ds-text) !important;
}

.ds-nav-sep {
  width: 1px;
  height: 12px;
  background: var(--ds-hairline-strong);
  flex: none;
}

.ds-nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ds-nav-tools button,
.ds-icon-btn {
  font: 500 12px/1 var(--ds-font-sans);
  color: var(--ds-text);
  background: transparent;
  cursor: pointer;
  border: 1px solid var(--ds-hairline-strong);
  border-radius: var(--ds-radius-pill);
  height: 28px;
  min-width: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease), background var(--ds-duration) var(--ds-ease);
}

.ds-nav-tools button:hover,
.ds-icon-btn:hover {
  border-color: var(--ds-accent);
  color: var(--ds-accent);
}

.ds-nav-tools .ds-nav-menu {
  display: none;
  width: 28px;
  padding: 0;
}

.ds-nav-menu span,
.ds-nav-menu span::before,
.ds-nav-menu span::after {
  display: block;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform var(--ds-duration) var(--ds-ease), opacity var(--ds-duration) var(--ds-ease);
}

.ds-nav-menu span::before,
.ds-nav-menu span::after {
  content: "";
  position: absolute;
  left: 0;
}

.ds-nav-menu span::before { top: -5px; }
.ds-nav-menu span::after { top: 5px; }

.ds-nav.is-open .ds-nav-menu span { background: transparent; }
.ds-nav.is-open .ds-nav-menu span::before { top: 0; transform: rotate(45deg); }
.ds-nav.is-open .ds-nav-menu span::after { top: 0; transform: rotate(-45deg); }

/* ---- hero ---- */
.ds-hero {
  padding: var(--ds-space-9) 0 var(--ds-space-8);
}

.ds-hero-kicker {
  margin: 0 0 10px;
  font-size: var(--ds-text-xs);
  font-weight: 600;
  letter-spacing: var(--ds-tracking-caps);
  text-transform: uppercase;
  color: var(--ds-text-secondary);
}

.ds-hero-title,
.ds-display {
  margin: 0 0 12px;
  font-family: var(--ds-font-display);
  font-size: var(--ds-text-display);
  font-weight: 600;
  line-height: var(--ds-leading-tight);
  letter-spacing: var(--ds-tracking-display);
  color: var(--ds-text);
}

.ds-hero-sub {
  margin: 0 0 20px;
  font-size: var(--ds-text-lg);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: var(--ds-tracking-tight);
  color: var(--ds-text-secondary);
}

.ds-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

/* ---- sections ---- */
.ds-section {
  padding: var(--ds-space-8) 0 var(--ds-space-6);
}

.ds-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}

.ds-section-title {
  margin: 0;
  font-family: var(--ds-font-display);
  font-size: var(--ds-text-2xl);
  font-weight: 600;
  line-height: var(--ds-leading-snug);
  letter-spacing: var(--ds-tracking-tight);
  color: var(--ds-text);
}

.ds-section-aside,
.ds-section-header a {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
}

.ds-section-header a:hover {
  color: var(--ds-accent);
}

/* ---- cards / tiles ---- */
.ds-card,
.ds-tile {
  background: var(--ds-bg-elevated);
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-1);
  overflow: hidden;
  transition: transform var(--ds-duration) var(--ds-ease-out), box-shadow var(--ds-duration) var(--ds-ease-out), border-color var(--ds-duration) var(--ds-ease);
}

.ds-card {
  padding: 22px;
}

.ds-tile {
  padding: 0;
}

.ds-card:hover,
.ds-tile:hover,
.ds-card.is-lift,
.ds-tile.is-lift {
  transform: translateY(-3px);
  box-shadow: var(--ds-shadow-lift);
  border-color: var(--ds-hairline-strong);
}

.ds-card-sm {
  border-radius: var(--ds-radius-md);
  padding: 18px;
}

.ds-card-flush {
  padding: 0;
}

/* ---- buttons ---- */
.ds-btn,
.ds-btn-fill,
.ds-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--ds-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  border-radius: var(--ds-radius-pill);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: background var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease), transform var(--ds-duration) var(--ds-ease), opacity var(--ds-duration) var(--ds-ease);
}

.ds-btn-fill,
.ds-btn {
  height: 44px;
  padding: 0 22px;
  background: var(--ds-accent);
  color: var(--ds-accent-ink) !important;
}

.ds-btn-fill:hover,
.ds-btn:hover {
  background: var(--ds-accent-hover);
  color: var(--ds-accent-ink) !important;
  transform: scale(1.02);
}

.ds-btn-fill:active,
.ds-btn:active {
  background: var(--ds-accent-active);
  transform: scale(0.98);
}

.ds-btn-link {
  height: auto;
  padding: 0;
  background: transparent;
  color: var(--ds-accent) !important;
}

.ds-btn-link::after {
  content: " ›";
  font-weight: 500;
}

.ds-btn-link:hover {
  color: var(--ds-accent-hover) !important;
}

.ds-btn-ghost {
  height: 36px;
  padding: 0 14px;
  background: var(--ds-bg-elevated);
  color: var(--ds-text) !important;
  border: 1px solid var(--ds-hairline-strong);
  border-radius: var(--ds-radius-pill);
}

.ds-btn-ghost:hover {
  border-color: var(--ds-accent);
  color: var(--ds-accent) !important;
}

/* ---- link pills ----
   Soft filled chips for icon+label outbound/nav links.
   Use .ds-link-pills on the row and .ds-link-pill (alias: .link-pill) on each <a>.
   Optional .ds-link-pill-accent for the primary item. */
.ds-link-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ds-link-pills > li {
  display: flex;
  margin: 0;
}

.ds-link-pill,
.link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-link-pill-bg);
  color: var(--ds-text) !important;
  font-family: var(--ds-font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.011em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 150ms var(--ds-ease), color 150ms var(--ds-ease), transform 150ms var(--ds-ease);
}

.ds-link-pill:hover,
.link-pill:hover {
  background: var(--ds-link-pill-bg-hover);
  color: var(--ds-accent) !important;
}

.ds-link-pill:active,
.link-pill:active {
  transform: scale(0.98);
}

.ds-link-pill:focus-visible,
.link-pill:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 3px;
}

.ds-link-pill svg,
.link-pill svg {
  width: 16px;
  height: 16px;
  flex: none;
  display: block;
  overflow: visible;
}

.ds-link-pill-accent,
.link-pill-accent {
  background: var(--ds-accent);
  color: #fff !important;
}

.ds-link-pill-accent:hover,
.link-pill-accent:hover {
  background: var(--ds-accent-hover);
  color: #fff !important;
}

.ds-link-pill-accent:active,
.link-pill-accent:active {
  background: var(--ds-accent-active);
  color: #fff !important;
}

/* ---- tags / chips ---- */
.ds-tag,
.ds-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--ds-radius-pill);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: var(--ds-accent-soft);
  color: var(--ds-accent);
  border: 0;
}

.ds-chip {
  background: var(--ds-surface-3);
  color: var(--ds-text);
}

.ds-tag-outline {
  background: transparent;
  color: var(--ds-text-secondary);
  box-shadow: inset 0 0 0 1px var(--ds-hairline-strong);
}

/* ---- tables ---- */
.ds-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-md);
  background: var(--ds-bg-elevated);
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ds-text-sm);
}

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

.ds-table th {
  font-weight: 600;
  color: var(--ds-text-secondary);
  font-size: 12px;
  letter-spacing: var(--ds-tracking-caps);
  text-transform: uppercase;
}

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

.ds-table tbody tr:hover td {
  background: color-mix(in srgb, var(--ds-surface-3) 45%, transparent);
}

/* ---- code ---- */
.ds-code,
.ds-prose code {
  font-family: var(--ds-font-mono);
  font-size: 0.88em;
  background: var(--ds-surface-3);
  color: var(--ds-text);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

.ds-pre,
.ds-prose pre {
  margin: 1.2em 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--ds-bg-elevated);
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-md);
  box-shadow: var(--ds-shadow-1);
  font-family: var(--ds-font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ds-text);
}

.ds-pre code,
.ds-prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* ---- quotes ---- */
.ds-quote,
.ds-prose blockquote {
  margin: 0;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--ds-hairline-strong);
  color: var(--ds-text-secondary);
}

.ds-quote p,
.ds-prose blockquote p {
  margin: 0;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: var(--ds-tracking-tight);
  font-style: italic;
}

.ds-quote footer {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-style: normal;
  color: var(--ds-text-tertiary);
}
.ds-quote cite {
  font-style: italic;
}

/* ---- article prose ---- */
.ds-prose {
  max-width: var(--ds-prose);
  color: var(--ds-text);
  font-size: var(--ds-text-body);
  line-height: var(--ds-leading-prose);
}

.ds-prose > * + * {
  margin-top: 0.9em;
}

.ds-prose h1,
.ds-prose h2,
.ds-prose h3,
.ds-prose h4 {
  font-family: var(--ds-font-display);
  font-weight: 600;
  letter-spacing: var(--ds-tracking-tight);
  line-height: var(--ds-leading-snug);
  color: var(--ds-text);
  margin: 1.6em 0 0.5em;
}

.ds-prose h1 { font-size: var(--ds-text-3xl); letter-spacing: var(--ds-tracking-display); }
.ds-prose h2 { font-size: var(--ds-text-2xl); }
.ds-prose h3 { font-size: var(--ds-text-xl); }
.ds-prose h4 { font-size: var(--ds-text-lg); }

.ds-prose p,
.ds-prose li {
  color: var(--ds-text);
}

.ds-prose a {
  color: var(--ds-accent);
}

.ds-prose a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ds-prose hr {
  border: 0;
  border-top: 1px solid var(--ds-hairline);
  margin: 2em 0;
}

.ds-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ds-radius-md);
}

.ds-prose ul,
.ds-prose ol {
  padding-left: 1.3em;
}

.ds-prose strong {
  font-weight: 600;
}

/* ---- footer ---- */
.ds-footer {
  margin-top: var(--ds-space-8);
  border-top: 1px solid var(--ds-hairline);
  background: var(--ds-bg);
  color: var(--ds-text-secondary);
  font-size: var(--ds-text-sm);
}

.ds-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 28px 0 48px;
}

.ds-footer p {
  margin: 0;
}

.ds-footer a {
  color: var(--ds-accent);
}

.ds-footer a:hover {
  color: var(--ds-accent-hover);
}

/* ---- helpers ---- */
.ds-muted { color: var(--ds-text-secondary); }
.ds-dim { color: var(--ds-text-tertiary); }
.ds-hairline { border-color: var(--ds-hairline); }

@media (max-width: 734px) {
  :root { --ds-gutter: 16px; }
  .ds-nav-tools .ds-nav-menu { display: inline-flex; }
  .ds-nav-links {
    display: none;
    position: absolute;
    top: var(--ds-nav-h);
    left: 0;
    right: 0;
    z-index: 51;
    margin: 0;
    padding: 8px var(--ds-gutter) 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ds-bg);
    border-bottom: 1px solid var(--ds-hairline);
    box-shadow: var(--ds-shadow-2);
  }
  .ds-nav.is-open .ds-nav-links { display: flex; }
  .ds-nav-links a {
    padding: 14px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--ds-hairline);
  }
  .ds-nav-sep { display: none; }
  .ds-hero { padding: 40px 0 36px; }
  .ds-section-title { font-size: 32px; }
  .ds-hero-sub { font-size: 19px; }
  .ds-quote p,
  .ds-prose blockquote p { font-size: 19px; }
}

@media (min-width: 1440px) {
  :root { --ds-max: 1080px; }
}
