/* CutPlan — Blog Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald: #059669;
  --white: #ffffff;
  --max-w: 760px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--slate-800);
  background: var(--slate-50);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.blog-nav {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.blog-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.blog-nav-logo span { color: var(--slate-700); font-weight: 400; }
.blog-nav-cta {
  background: var(--blue);
  color: var(--white);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.blog-nav-cta:hover { background: var(--blue-dark); }

/* ── BREADCRUMB ── */
.blog-breadcrumb {
  max-width: var(--max-w);
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.8125rem;
  color: var(--slate-400);
}
.blog-breadcrumb a { color: var(--slate-400); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--blue); }

/* ── ARTICLE HEADER ── */
.blog-article {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.blog-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue);
  background: #eff6ff;
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  margin-bottom: 1rem;
}
.blog-article h1 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--slate-900);
  margin-bottom: 1rem;
}
.blog-meta {
  font-size: 0.875rem;
  color: var(--slate-400);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.blog-meta strong { color: var(--slate-600); }

/* ── ARTICLE BODY ── */
.blog-body { font-size: 1.0625rem; }
.blog-body p { margin-bottom: 1.25rem; }
.blog-body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 2.25rem 0 0.875rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--slate-200);
}
.blog-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 1.5rem 0 0.5rem;
}
.blog-body ul, .blog-body ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}
.blog-body li { margin-bottom: 0.4rem; }
.blog-body strong { color: var(--slate-900); }
.blog-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.blog-body a:hover { color: var(--blue-dark); }

/* Table */
.blog-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.blog-body th {
  background: var(--slate-100);
  text-align: left;
  padding: 0.6rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-600);
  border-bottom: 2px solid var(--slate-200);
}
.blog-body td {
  padding: 0.6rem 0.875rem;
  border-bottom: 1px solid var(--slate-200);
}
.blog-body tr:last-child td { border-bottom: none; }

/* Callout / tip box */
.blog-tip {
  background: #eff6ff;
  border-left: 4px solid var(--blue);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.blog-tip strong { color: var(--blue-dark); }

/* ── CTA BOX ── */
.blog-cta {
  margin: 2.5rem 0;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border-radius: 16px;
  padding: 2rem 2rem;
  text-align: center;
  color: var(--white);
}
.blog-cta h3 {
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.blog-cta p {
  opacity: 0.85;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}
.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--white);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.blog-cta-btn:hover { opacity: 0.9; }

/* ── BLOG INDEX LIST ── */
.blog-index-grid {
  max-width: var(--max-w);
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  gap: 1.5rem;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  display: block;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.blog-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: var(--blue);
}
.blog-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue);
  margin-bottom: 0.5rem;
}
.blog-card h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}
.blog-card p {
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.blog-card-meta {
  font-size: 0.8rem;
  color: var(--slate-400);
}

/* ── PAGE HEADER (blog index) ── */
.blog-page-header {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding: 0 1.5rem;
}
.blog-page-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}
.blog-page-header p { color: var(--slate-600); }

/* ── FOOTER ── */
.blog-footer {
  border-top: 1px solid var(--slate-200);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--slate-400);
}
.blog-footer a { color: var(--slate-600); text-decoration: none; margin: 0 0.5rem; }
.blog-footer a:hover { color: var(--blue); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .blog-article { padding: 1.5rem 1rem 3rem; }
  .blog-cta { padding: 1.5rem 1.25rem; }
}

/* ── DARK MODE ── */
@media (prefers-color-scheme: dark) {
  :root {
    --slate-900: #f1f5f9;
    --slate-800: #e2e8f0;
    --slate-700: #cbd5e1;
    --slate-600: #94a3b8;
    --slate-400: #64748b;
    --slate-200: #2a3244;
    --slate-100: #1c2230;
    --slate-50: #0f1319;
    --white: #141920;
  }
  body { color: #e2e8f0; background: #0f1319; }
  .blog-nav { background: #1a1f2e; border-bottom-color: #2a3244; }
  .blog-nav-logo span { color: #cbd5e1; }
  .blog-tag { background: rgba(37,99,235,0.15); }
  .blog-body th { background: #1c2230; border-bottom-color: #2a3244; }
  .blog-body td { border-bottom-color: #2a3244; }
  .blog-tip { background: rgba(37,99,235,0.1); }
  .blog-card { background: #1c2230; border-color: #2a3244; }
  .blog-card:hover { border-color: #2563eb; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
  .blog-footer { border-top-color: #2a3244; }
  .blog-footer a { color: #94a3b8; }
  code, pre { background: #1c2230 !important; color: #e2e8f0; }
}
.dark {
  --slate-900: #f1f5f9;
  --slate-800: #e2e8f0;
  --slate-700: #cbd5e1;
  --slate-600: #94a3b8;
  --slate-400: #64748b;
  --slate-200: #2a3244;
  --slate-100: #1c2230;
  --slate-50: #0f1319;
  --white: #141920;
}
.dark body, body.dark { color: #e2e8f0; background: #0f1319; }
.dark .blog-nav { background: #1a1f2e; border-bottom-color: #2a3244; }
.dark .blog-nav-logo span { color: #cbd5e1; }
.dark .blog-tag { background: rgba(37,99,235,0.15); }
.dark .blog-body th { background: #1c2230; border-bottom-color: #2a3244; }
.dark .blog-body td { border-bottom-color: #2a3244; }
.dark .blog-tip { background: rgba(37,99,235,0.1); }
.dark .blog-card { background: #1c2230; border-color: #2a3244; }
.dark .blog-card:hover { border-color: #2563eb; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.dark .blog-footer { border-top-color: #2a3244; }
.dark .blog-footer a { color: #94a3b8; }
.dark code, .dark pre { background: #1c2230 !important; color: #e2e8f0; }
