/* Topic pages (forfans.me/creator-earnings, /app-for-fans). Built on home.css (colours, fonts,
   header, footer, buttons, calculator); this file only adds the article layout. */

.p-wrap { max-width: 860px; margin: 0 auto; padding: 150px 28px 40px; }
.p-crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 26px; display: flex; gap: 8px; flex-wrap: wrap; }
.p-crumbs a { color: var(--muted) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.p-title { font-size: clamp(40px, 6.4vw, 76px); line-height: 1; letter-spacing: -0.045em; font-weight: 600; color: var(--ink); }
.p-title em { color: var(--rose); letter-spacing: -0.02em; }
.p-lede { font-size: 20px; line-height: 1.55; color: var(--ink-2); margin-top: 26px; max-width: 700px; }

.p-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 40px 0 10px; }
.p-facts div { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; }
.p-facts dt { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.p-facts dd { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }

.p-section { margin-top: 90px; }
.p-h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 600; color: var(--ink); }
.p-h2 em { color: var(--rose); }
.p-text { font-size: 17.5px; line-height: 1.65; color: var(--ink-2); margin-top: 18px; }
.p-text a, .p-card a, .p-list a { color: var(--rose-deep) !important; text-decoration: underline !important; text-underline-offset: 3px; }

.p-cards { display: grid; gap: 14px; margin-top: 30px; }
.p-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px 26px 24px; }
.p-card h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); display: flex; gap: 12px; align-items: baseline; }
.p-card h3 span { font-size: 13px; color: var(--rose); font-weight: 600; }
.p-card p { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); margin-top: 10px; }
.p-example { margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--paper); font-size: 15px; line-height: 1.55; color: var(--ink); }
.p-example b { font-weight: 600; }

.p-table { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 16px; background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.p-table th, .p-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.p-table th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--paper); }
.p-table tr:last-child td { border-bottom: 0; }
.p-table td:last-child, .p-table th:last-child { text-align: right; }
.p-note { font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 14px; }

.p-steps { counter-reset: step; list-style: none; padding: 0; margin-top: 26px; display: grid; gap: 12px; }
.p-steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 66px; background: #fff; border: 1px solid var(--line); border-radius: 18px; font-size: 16.5px; line-height: 1.55; color: var(--ink-2); }
.p-steps li::before { content: counter(step); position: absolute; left: 20px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600; display: grid; place-items: center; font-size: 15px; }
.p-steps b { color: var(--ink); }

.p-list { margin-top: 22px; padding-left: 22px; display: grid; gap: 10px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.p-list b { color: var(--ink); }

.p-cta { margin-top: 90px; padding: 46px 30px; border-radius: 28px; background: var(--ink); color: #fbf3ef; text-align: center; }
.p-cta h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.04em; font-weight: 600; line-height: 1.05; }
.p-cta p { margin-top: 12px; color: #d8cfca; font-size: 16.5px; }
.p-cta .h-hero-actions { justify-content: center; margin-top: 26px; }
.p-cta .h-store { background: #fff; color: var(--ink) !important; }

.p-related { margin-top: 70px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.p-related a { display: block; padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: #fff; color: var(--ink) !important; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; transition: transform .3s var(--ease), box-shadow .3s; }
.p-related a small { display: block; font-weight: 500; font-size: 14px; color: var(--muted); margin-top: 6px; }
.p-related a:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(23, 17, 15, .08); }

/* The level calculator section sits inside the article */
.p-ladder .h-ladder { padding: 40px 0 0; }

@media (max-width: 640px) {
    .p-wrap { padding: 118px 16px 30px; }
    .p-lede { font-size: 18px; }
    .p-section { margin-top: 64px; }
    .p-card { padding: 22px 18px; }
    .p-table th, .p-table td { padding: 12px 12px; font-size: 14.5px; }
    .p-cta { padding: 36px 18px; }
}
