/*
 * Schaefer Market Research — Custom Styles
 * TailwindCSS is loaded via CDN in head.html
 */

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Article Prose ===== */
.prose-article { max-width: 65ch; }

/* Headings */
.prose-article h2 {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eef2ff;
  line-height: 1.3;
}

.prose-article h3 {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.prose-article h4 {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Paragraphs */
.prose-article p {
  margin-bottom: 1.375rem;
  line-height: 1.8;
}

/* First paragraph — subtle emphasis */
.prose-article > p:first-of-type {
  font-size: 1.125rem;
  color: #374151;
  line-height: 1.75;
}

/* Links */
.prose-article a {
  color: #4f46e5;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.prose-article a:hover {
  border-bottom-color: #4f46e5;
}

/* Strong */
.prose-article strong {
  color: #111827;
  font-weight: 600;
}

/* Lists */
.prose-article ul, .prose-article ol {
  margin-bottom: 1.375rem;
  padding-left: 1.25rem;
}
.prose-article ul { list-style-type: disc; }
.prose-article ol { list-style-type: decimal; }
.prose-article li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  padding-left: 0.25rem;
}
.prose-article li::marker {
  color: #4f46e5;
}

/* Blockquote */
.prose-article blockquote {
  border-left: 3px solid #4f46e5;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  background: #f8fafc;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #4b5563;
}
.prose-article blockquote p {
  margin-bottom: 0;
}

/* Tables */
.prose-article table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.75rem 0;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.prose-article thead {
  background: #f8fafc;
}
.prose-article th {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-weight: 600;
  font-size: 0.8125rem;
  color: #374151;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.prose-article td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
  vertical-align: top;
}
.prose-article tbody tr:last-child td {
  border-bottom: none;
}
.prose-article tbody tr:hover {
  background: #fafafa;
}

/* Code */
.prose-article code {
  font-size: 0.875em;
  background: #f3f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  color: #1f2937;
}
.prose-article pre {
  background: #1f2937;
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.75rem 0;
}
.prose-article pre code {
  background: transparent;
  padding: 0;
  color: #e5e7eb;
}

/* Images */
.prose-article img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

/* Horizontal rule */
.prose-article hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2.5rem 0;
}

/* ===== Legacy Prose (for list/index templates) ===== */
.prose { max-width: 65ch; }
.prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.375rem; }
.prose blockquote { border-left-width: 3px; padding-left: 1rem; margin: 1.5rem 0; font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.prose th, .prose td { padding: 0.625rem 0.75rem; border-bottom: 1px solid #e5e7eb; text-align: left; }
.prose img { border-radius: 0.75rem; }

/* ===== Utilities ===== */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Accessibility ===== */
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }

/* ===== Transitions ===== */
a, button { transition: color 0.15s ease, background-color 0.15s ease; }

/* ===== Print ===== */
@media print {
  header, footer, nav, .no-print { display: none !important; }
  .prose-article, .prose { max-width: 100%; }
  body { font-size: 12pt; color: #000; }
}
