/* GutCode — Article Override System
   Loads after Tailwind CDN to restyle all article pages.
   Warm light editorial: Cormorant Garamond headings, Source Serif body, forest green accent.
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Serif+4:wght@300;400;600&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg: #FAFAF7;
  --surface: #F4F4F0;
  --border: #E0E0D8;
  --accent: #2D6A4F;
  --accent2: #52B788;
  --accent-dim: rgba(45,106,79,0.08);
  --text: #1a1a18;
  --muted: #6b6b60;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --body: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

/* ── Base ── */
body, html {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--body) !important;
}

body *, [class*="bg-purple"], [class*="bg-indigo"],
[class*="from-purple"], [class*="to-indigo"],
[class*="gradient"] {
  background-image: none !important;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
}

h2 { color: var(--accent) !important; }
h3 { font-style: italic !important; color: var(--text) !important; }

p, li, td, blockquote {
  font-family: var(--body) !important;
  color: var(--text) !important;
  line-height: 1.8 !important;
}

a {
  color: var(--accent) !important;
  text-decoration: none !important;
}
a:hover {
  color: var(--accent2) !important;
  text-decoration: underline !important;
}

/* ── Backgrounds ── */
[class*="bg-white"], .bg-white { background: var(--bg) !important; }
[class*="bg-gray-50"], [class*="bg-gray-100"] { background: var(--surface) !important; }

/* Purple/indigo → light green */
[class*="bg-purple"], [class*="bg-indigo"], [class*="bg-blue"],
[class*="bg-violet"] {
  background: var(--accent-dim) !important;
}

/* Dark backgrounds → surface */
[class*="bg-gray-800"], [class*="bg-gray-900"], [class*="bg-slate-800"],
[class*="bg-slate-900"] {
  background: var(--surface) !important;
  color: var(--text) !important;
}

/* ── Article container ── */
.prose, article, main, [class*="content"], [class*="article"] {
  max-width: 720px !important;
  margin: 0 auto !important;
  background: transparent !important;
}

/* ── Accent text overrides ── */
[class*="text-purple"], [class*="text-indigo"], [class*="text-blue"],
[class*="text-violet"] {
  color: var(--accent) !important;
}

/* ── Borders ── */
[class*="border"] {
  border-color: var(--border) !important;
}

/* ── Buttons ── */
button, [class*="btn"], [role="button"] {
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  font-family: var(--sans) !important;
  font-weight: 500 !important;
}
button:hover {
  background: var(--accent2) !important;
}

/* ── Tables ── */
table {
  border-collapse: collapse !important;
  width: 100% !important;
  background: var(--surface) !important;
}
th {
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  font-size: 0.82em !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  padding: 10px 16px !important;
}
td {
  padding: 10px 16px !important;
  border-bottom: 1px solid var(--border) !important;
  font-family: var(--body) !important;
}

/* ── Blockquote ── */
blockquote {
  border-left: 3px solid var(--accent) !important;
  background: var(--accent-dim) !important;
  padding: 16px 20px !important;
  margin: 24px 0 !important;
  font-style: italic !important;
  font-family: var(--serif) !important;
}

/* ── Code ── */
code, pre {
  background: var(--surface) !important;
  color: var(--accent) !important;
  border: 1px solid var(--border) !important;
}

/* ── Nav ── */
nav, header {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border) !important;
}
nav a, header a { color: var(--text) !important; }

/* ── Muted ── */
[class*="text-gray"], [class*="text-slate"], [class*="text-muted"] {
  color: var(--muted) !important;
}

/* ── Forms ── */
input, textarea, select {
  background: #fff !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}
input::placeholder, textarea::placeholder { color: var(--muted) !important; }

/* ── Footer ── */
footer {
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--muted) !important;
}
