@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:wght@300;400;500;600&display=swap');

:root {
  --bg: #f7f4ee;
  --ink: #1f1b16;
  --muted: #5a534b;
  --card: #ffffff;
  --accent: #2f5d50;
  --accent-dark: #1a3d33;
  --accent-warm: #bf6b2e;
  --border: #d6d0c6;
  --danger: #7a1b1b;
  --danger-bg: #f3e5e5;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "IBM Plex Serif", "Georgia", "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

/* Header */
.site-header {
  padding: 24px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, #e8dfd1, #f7f4ee);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  color: var(--ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--accent);
}

/* Navigation */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 14px;
}

.nav a {
  color: var(--ink);
  padding: 4px 0;
}

.nav a.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* Main Layout */
main {
  max-width: 980px;
  margin: 32px auto 64px;
  padding: 0 20px;
}

/* Hero Section */
.hero {
  padding: 40px 0 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: center;
}

.hero h1 {
  margin-top: 0;
  font-size: clamp(2.2rem, 5vw, 3rem);
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 480px;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  border: 1px solid var(--accent);
  transition: all 0.2s;
}

.button:hover {
  background: var(--accent-dark);
  color: #fff;
  border-bottom-color: transparent;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}

.button.secondary:hover {
  border-color: var(--accent);
  background: rgba(47, 93, 80, 0.05);
}

/* Cards & Grid */
.section {
  padding: 40px 0;
  border-top: 1px solid rgba(214, 208, 198, 0.5);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block; /* for anchor cards */
}

a.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: var(--accent);
}

.card h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--ink);
}

.tag {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fbfaf7;
}

/* Footer */
.site-footer {
  margin-top: 60px;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  background: #f4efe4;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

/* Utilities */
pre {
  background: #111110;
  color: #f5f3ed;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
}

code {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  background: #eee6da;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.9em;
}

pre code {
  background: transparent;
  padding: 0;
  font-size: 1em;
}

blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  color: var(--muted);
  margin: 1.5em 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 15px;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  vertical-align: top;
}

th {
  background: #efe7da;
  text-align: left;
  font-family: "IBM Plex Sans", sans-serif;
}

tbody tr:nth-child(even) td {
  background: #fbfaf7;
}

.list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.list li {
  padding-left: 20px;
  position: relative;
}

.list li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
}

/* Comparison Grid (Specific to CNL index) */
.comparison-grid {
  display: grid;
  gap: 16px;
}
.comparison-item {
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}
.comparison-item.bad { border-left: 4px solid var(--danger); }
.comparison-item.good { border-left: 4px solid var(--accent); }
