/* Articles — server-rendered by the app, styled to match the marketing site.
   Reuses the design tokens defined in styles.css (:root). Kept deliberately
   simple and readable so long-form content is comfortable to read. */

.article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--border, #e6ddcf);
}
.article-header a { color: var(--text, #1c2b28); text-decoration: none; font-weight: 600; }
.article-header a:hover { color: var(--accent, #1a8b6e); }
.article-home { font-weight: 800; letter-spacing: -0.01em; }

.article-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.article-main.wide { max-width: 1080px; }

.article-eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #1a8b6e);
  margin: 0 0 0.6rem;
}
.article-main h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  color: var(--text, #1c2b28);
}
.article-lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted, #55625d);
  margin: 0 0 2rem;
}

.article-body { font-size: 1.05rem; line-height: 1.75; color: var(--text, #26332f); }
.article-body > * + * { margin-top: 1.15rem; }
.article-body h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; margin-top: 2.4rem; }
.article-body h3 { font-size: 1.2rem; margin-top: 1.8rem; }
.article-body a { color: var(--accent, #1a8b6e); text-underline-offset: 2px; }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-body li + li { margin-top: 0.4rem; }
.article-body blockquote {
  border-left: 3px solid var(--accent, #1a8b6e);
  padding: 0.4rem 0 0.4rem 1.1rem;
  margin-left: 0;
  color: var(--muted, #55625d);
  font-style: italic;
}
.article-body code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--surface2, #f0e9dc);
  border: 1px solid var(--border, #e6ddcf);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}
.article-body pre {
  background: var(--surface2, #f0e9dc);
  border: 1px solid var(--border, #e6ddcf);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
.article-body pre code { background: none; border: none; padding: 0; }
.article-body img { max-width: 100%; height: auto; border-radius: 10px; }

.article-faq { margin-top: 3rem; border-top: 1px solid var(--border, #e6ddcf); padding-top: 1.6rem; }
.article-faq h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.article-faq details {
  border: 1px solid var(--border, #e6ddcf);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.7rem;
  background: var(--surface, #fffdf8);
}
.article-faq summary { font-weight: 650; cursor: pointer; }
.article-faq details[open] summary { margin-bottom: 0.5rem; }
.article-faq p { margin: 0; color: var(--muted, #55625d); line-height: 1.65; }

.article-cta {
  margin-top: 3rem;
  padding: 1.6rem;
  border: 1px solid var(--border, #e6ddcf);
  border-radius: 14px;
  background: var(--surface, #fffdf8);
  text-align: center;
}
.article-cta .btn-primary {
  display: inline-block;
  background: var(--accent, #1a8b6e);
  color: #fff;
  font-weight: 650;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  text-decoration: none;
}
.article-cta .btn-primary:hover { background: var(--accent2, #0d9488); }

/* Index / listing */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
  margin-top: 1.5rem;
}
.article-card {
  display: block;
  border: 1px solid var(--border, #e6ddcf);
  border-radius: 14px;
  padding: 1.4rem;
  background: var(--surface, #fffdf8);
  text-decoration: none;
  color: var(--text, #1c2b28);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.article-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent, #1a8b6e);
  box-shadow: 0 10px 30px rgba(26, 139, 110, 0.12);
}
.article-card h2 { font-size: 1.2rem; line-height: 1.25; margin: 0.4rem 0 0.5rem; }
.article-card p { margin: 0; color: var(--muted, #55625d); font-size: 0.95rem; line-height: 1.55; }

.article-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border, #e6ddcf);
  color: var(--muted, #55625d);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .article-card { transition: none; }
}
