/* ============================================================================
   ARTICLE LAYOUT FOR POSTS BUILT FROM POST-TEMPLATE.html

   POST-TEMPLATE.html assumed blog-styles.css carried the article layout. It
   doesn't: blog-styles.css only holds the ~10 rules that were identical across
   the older posts, and those posts each keep their layout in an inline <style>.
   Every post started from the template since Sep 17 therefore shipped with no
   layout at all: no side padding, and an 800px hero overflowing a phone screen.

   These are the clear-documents-and-data-iphone.html values (the generation the
   template names), rewritten for the template's markup, which puts h1, p, ul and
   h2 directly inside <article class="article"> rather than inside
   .article-header / .article-body wrappers. Link it after blog-styles.css.
   Older posts don't link it, so they are unaffected.
   ========================================================================== */

.nav-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.nav-back:hover { text-decoration: underline; }

.article { max-width: 760px; margin: 0 auto; padding: 60px 24px 80px; }
.article-tag { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink-dark); background: var(--pink-light); padding: 4px 12px; border-radius: 50px; margin-bottom: 16px; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 16px; }
.article-meta { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 28px; }
.article-hero { display: block; width: 100%; height: 320px; object-fit: cover; border-radius: 20px; margin-bottom: 36px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); }

.article > h2 { font-size: 1.4rem; font-weight: 800; margin: 40px 0 16px; letter-spacing: -0.02em; scroll-margin-top: 72px; }
.article > h3 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 12px; scroll-margin-top: 72px; }
.article > p { font-size: 1rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 20px; }
.article > ul, .article > ol { margin: 0 0 20px 24px; }
.article > ul > li, .article > ol > li { font-size: 1rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 8px; }
.article > p strong, .article > ul strong, .article > ol strong { color: var(--text); }
.article > p a, .article > ul a, .article > ol a { color: var(--pink-dark); }
.article table { color: var(--text-secondary); }
.article th { color: var(--text); }

.tip-box { background: var(--pink-light); border-left: 4px solid var(--pink); padding: 20px 24px; border-radius: 0 12px 12px 0; margin: 28px 0; }
.tip-box p { margin: 0; color: var(--text); font-size: 0.95rem; }
.tip-box strong { color: var(--pink-dark); }

.cta-box { background: linear-gradient(135deg, var(--pink), var(--purple)); color: var(--white); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin: 48px 0; }
.cta-box h3 { font-size: 1.4rem; font-weight: 800; margin: 0 0 12px; color: var(--white); }
.cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 20px; font-size: 1rem; }
.cta-box a { display: inline-flex; align-items: center; gap: 8px; background: var(--white); color: var(--pink-dark); padding: 14px 32px; border-radius: 14px; font-weight: 700; font-size: 1rem; text-decoration: none; transition: transform 0.2s; }
.cta-box a:hover { transform: translateY(-2px); }

.related-section { margin-top: 60px; padding-top: 40px; border-top: 1px solid rgba(0,0,0,0.06); }
.related-section h2 { font-size: 1.1rem; margin: 0 0 20px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.related-card { display: block; background: var(--white); border-radius: 16px; padding: 20px; text-decoration: none; color: var(--text); border: 1px solid rgba(0,0,0,0.04); box-shadow: var(--card-shadow); transition: all 0.2s; }
.related-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.related-card-tag { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink-dark); margin-bottom: 6px; }
.related-card h3 { font-size: 0.95rem; font-weight: 700; margin: 0; line-height: 1.3; }

footer { background: var(--text); color: #94a3b8; padding: 48px 24px; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 32px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: color 0.2s; }

@media (max-width: 640px) {
  .article { padding: 36px 16px 64px; }
  .article-hero { height: 200px; border-radius: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 32px 24px; }
}
