/* ============================================================
   By JTT — Blog Component Styles
   Type-aware badges, filters, pillar cards, disclosure, CTA
   ============================================================ */

/* ---- Type Badge (post-type tag in header + post list) ---- */
.type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  margin-left: 0.5rem;
}

.post-type-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 0;
}

/* ---- Affiliate Badge (post list) ---- */
.affiliate-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15em 0.5em;
  border-radius: 2px;
  background: var(--chip);
  color: var(--ink);
}

/* ---- Post List Enhancements ---- */
.post-item[data-type] {
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}

.post-item[data-type="affiliate-best-of"],
.post-item[data-type="affiliate-tool-review"] {
  border-left-color: var(--signal);
}

.post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-title-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.post-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: center;
}

.meta-dot {
  opacity: 0.5;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.65rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.1em 0.45em;
  border-radius: 2px;
}

/* ---- Affiliate Disclosure ---- */
.affiliate-disclosure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal-soft);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  font-size: 0.82rem;
  color: var(--muted);
  border-radius: 2px;
}

.disclosure-label {
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  margin-right: 0.4rem;
}

/* ---- Affiliate CTA Section ---- */
.affiliate-cta {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.affiliate-cta h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.affiliate-cta > p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.affiliate-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.affiliate-links li {
  margin: 0;
}

.affiliate-links a {
  display: inline-flex;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--signal);
  color: var(--ink);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, transform 0.1s;
}

.affiliate-links a:hover {
  background: var(--signal);
  color: var(--paper);
}

.affiliate-links .commission-tag {
  margin-left: 0.4rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 400;
}

/* ---- Newsletter Signup ---- */
.newsletter-signup {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  text-align: center;
}

.newsletter-signup h2 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.newsletter-signup > p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--signal);
}

.newsletter-form button {
  appearance: none;
  background: var(--signal);
  color: var(--paper);
  border: none;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: inherit;
}

.newsletter-form button:hover {
  opacity: 0.9;
}

.nl-fine-print {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.6rem;
  opacity: 0.7;
}

/* ---- Related Posts ---- */
.related-posts {
  margin: 2.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.related-posts h2 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.related-list li:last-child {
  border-bottom: none;
}

.related-list a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
}

.related-list a:hover {
  color: var(--signal);
}

.related-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ---- Comparison Table (used in affiliate-best-of posts) ---- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.comparison-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface);
}

.comparison-table td {
  color: var(--ink);
}

.comparison-table tr:last-child td,
.comparison-table tr:last-child th {
  border-bottom: none;
}

/* ---- FAQ Block ---- */
.faq-block {
  margin: 1.5rem 0;
}

.faq-block details {
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.faq-block details:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.faq-block summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.faq-block summary::-webkit-details-marker {
  display: none;
}

.faq-block summary::before {
  content: "+";
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--signal);
}

.faq-block details[open] summary::before {
  content: "−";
}

.faq-block p {
  margin: 0.5rem 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .affiliate-links {
    flex-direction: column;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input[type="email"],
  .newsletter-form button {
    width: 100%;
  }
}

/* ---- Pillar Page Styles ---- */
.pillar-cta {
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.pillar-cta p {
  margin: 0;
}

.affiliate-badge-sm {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12em 0.4em;
  border-radius: 2px;
  background: var(--chip);
  color: var(--ink);
  margin-top: 0.3rem;
}

/* ---- Page Head (pillar pages) ---- */
.page-head-inner {
  max-width: 720px;
}

/* ---- Post list on pillar pages ---- */
.pillar-page .post-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.pillar-page .post-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pillar-page .post-title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0.25rem 0;
}

.pillar-page .post-meta {
  font-size: 0.75rem;
}

.pillar-page .post-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0.5rem;
}

.pillar-cta {
  margin-top: 2rem;
}
@media (prefers-color-scheme: dark) {
  .type-badge {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--line);
  }


}