/* Reset & base — warm editorial palette aligned with systemdr.systemdrd.com (Substack) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FFFCF8;
  --bg-2: #F5F0E8;
  --bg-3: #EDE6DC;
  --bg-card: #FFFFFF;
  --border: #E8E0D6;
  --border-2: #D4C9BC;
  --ink: #1C1816;
  --ink-2: #6B5F58;
  --ink-3: #9A8F87;
  --amber: #BF4D26;
  --amber-dim: #9A3E1E;
  --amber-glow: rgba(191, 77, 38, 0.12);
  --green: #0F6E56;
  --red: #C45050;
  --r: 4px;
  --r-lg: 10px;
  --font-display: 'Instrument Serif', 'Fraunces', Georgia, serif;
  --font-ui: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --substack-orange: #FF6719;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--amber);
  color: var(--bg-card);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { color: var(--ink-2); margin-bottom: 1em; }
a { color: var(--amber); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-dim); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem;
  overflow-x: auto;
}

img { max-width: 100%; height: auto; display: block; }

section { padding: 100px 0; }

.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .navbar { top: 46px; }
}

.sdir-inline-checkout .sdir-checkout-btn { width: 100%; }
