:root {
  --palette: 'earthy-forest-hughes';
  
  /* Earthy Forest Hughes (default) */
  --bg: #DAD7CD;
  --fg: #344E41;
  --muted: #A3B18A;
  --border: #588157;
  --accent: #588157;
  --accent-2: #3A5A40;
  --code-bg: #F5F5F0;
  
  /* Typography */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Font sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Line heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  
  /* Borders */
  --border-width: 1px;
  --border-radius: 0.375rem;
  --border-radius-lg: 0.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  
  /* Layout */
  --max-width: 65ch;
  --max-width-wide: 80ch;
  --header-height: 4rem;
}

/* Ocean Blues palette */
[data-palette="ocean-blues"] {
  --bg: #E8F4F8;
  --fg: #1D3557;
  --muted: #A8DADC;
  --border: #457B9D;
  --accent: #457B9D;
  --accent-2: #2E4057;
  --code-bg: #F0F8FF;
}

/* Warm Sunset palette */
[data-palette="warm-sunset"] {
  --bg: #FEF7ED;
  --fg: #7C2D12;
  --muted: #FDD4A0;
  --border: #F59E0B;
  --accent: #F59E0B;
  --accent-2: #EA580C;
  --code-bg: #FFFBF5;
}

/* Base styles */
* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-family-base);
  line-height: var(--leading-normal);
  color: var(--fg);
  background-color: var(--bg);
  transition: color var(--transition-normal), background-color var(--transition-normal);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-2);
}

code {
  font-family: var(--font-family-mono);
  font-size: 0.9em;
  background-color: var(--code-bg);
  padding: 0.125rem 0.25rem;
  border-radius: var(--border-radius);
  border: var(--border-width) solid var(--border);
}

pre {
  font-family: var(--font-family-mono);
  background-color: var(--code-bg);
  border: var(--border-width) solid var(--border);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-sm);
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--muted);
}

.border {
  border: var(--border-width) solid var(--border);
}

.rounded {
  border-radius: var(--border-radius);
}

.shadow {
  box-shadow: var(--shadow);
}

/* Focus styles */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px;
  border-radius: var(--border-radius);
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}