/* =========================================================
   KnitYY Blog — article typography and listing styles
   Scoped to /blog/ pages only. Complements app.css + main.css.
   ========================================================= */

/* ---------- Article body ---------- */
.yy-article {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #374151;
}
.yy-article > * + * { margin-top: 1.15rem; }
.yy-article h2 {
  margin-top: 2.6rem;
  font-size: 1.55rem;
  line-height: 1.35;
  font-weight: 700;
  color: #0f2742;
  scroll-margin-top: 90px;
}
.yy-article h3 {
  margin-top: 1.9rem;
  font-size: 1.18rem;
  font-weight: 700;
  color: #0f2742;
  scroll-margin-top: 90px;
}
.yy-article p { margin: 0; }
.yy-article strong { color: #16202e; font-weight: 600; }
.yy-article a { color: #0f2742; text-decoration: underline; text-underline-offset: 3px; }
.yy-article a:hover { color: #2563eb; }
.yy-article ul, .yy-article ol { padding-left: 1.35rem; }
.yy-article li + li { margin-top: 0.45rem; }
.yy-article ul { list-style: disc; }
.yy-article ol { list-style: decimal; }
.yy-article blockquote {
  margin: 1.6rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 3px solid #0f2742;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.97rem;
}
.yy-article blockquote p + p { margin-top: 0.7rem; }

/* ---------- Tables ---------- */
.yy-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
}
.yy-article th, .yy-article td {
  border: 1px solid #e2e8f0;
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.yy-article th {
  background: #0f2742;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.yy-article tbody tr:nth-child(even) { background: #f8fafc; }
.yy-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Article meta / breadcrumbs ---------- */
.yy-breadcrumbs {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}
.yy-breadcrumbs a { color: #cbd5e1; text-decoration: none; }
.yy-breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.yy-breadcrumbs span { color: #64748b; margin: 0 0.35rem; }
.yy-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 1.1rem;
}

/* ---------- Callout / CTA box ---------- */
.yy-callout {
  margin: 2.2rem 0;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2563eb;
  background: #fff;
  padding: 1.2rem 1.3rem;
}
.yy-callout h3 { margin-top: 0; font-size: 1.02rem; }
.yy-callout p { font-size: 0.93rem; color: #475569; }
.yy-callout .yy-btn { margin-top: 0.9rem; }

/* ---------- Key takeaways ---------- */
.yy-takeaways {
  background: #0f2742;
  color: #e2e8f0;
  padding: 1.3rem 1.4rem;
  margin: 1.8rem 0;
}
.yy-takeaways h2 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93c5fd;
}
.yy-takeaways ul { margin: 0; padding-left: 1.15rem; font-size: 0.93rem; }
.yy-takeaways li + li { margin-top: 0.4rem; }

/* ---------- Listing cards ---------- */
.yy-post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: box-shadow .2s ease, transform .2s ease;
}
.yy-post-card:hover {
  box-shadow: 0 10px 30px -12px rgba(15,39,66,.25);
  transform: translateY(-2px);
}
.yy-post-card .yy-post-tag {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2563eb;
}
.yy-post-card h2 {
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 700;
  color: #0f2742;
}
.yy-post-card h2 a { color: inherit; text-decoration: none; }
.yy-post-card h2 a:hover { color: #2563eb; }
.yy-post-card p { font-size: 0.9rem; color: #64748b; line-height: 1.7; }
.yy-post-card > a img { display: block; width: 100%; height: 220px; object-fit: cover; }
.yy-post-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.yy-post-foot {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}
.yy-post-foot a { color: #0f2742; font-weight: 600; text-decoration: none; white-space: nowrap; }
.yy-post-foot a:hover { color: #2563eb; }
@media (max-width: 640px) {
  .yy-post-card > a img { height: 190px; }
}

/* ---------- Listing CTA row ---------- */
.yy-cta-row {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
}
@media (min-width: 768px) {
  .yy-cta-row { flex-direction: row; align-items: center; padding: 2rem; }
}

@media (max-width: 640px) {
  .yy-article { font-size: 0.98rem; }
  .yy-article h2 { font-size: 1.35rem; }
}
