/* freeflow: article, tool and utility pages.
   extends landing.css (same tokens, same voice). keep it small. */

/* breadcrumbs */
.crumbs { padding-top: calc(var(--nav-h) + 28px); font-size: 13px; font-weight: 300; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--muted); transition: color 0.2s; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--body); }

/* article layout */
.article { max-width: 680px; margin-inline: auto; padding: 28px 0 72px; }
.article h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem); font-weight: 200; letter-spacing: -0.025em; line-height: 1.05; }
.article .meta { margin-top: 18px; font-size: 13px; font-weight: 300; color: var(--muted); }
.article .meta span + span::before { content: "·"; margin: 0 8px; }
.article .lead { margin-top: 26px; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); color: var(--text); font-weight: 300; max-width: none; }
.article .body { margin-top: 40px; font-size: 17px; font-weight: 300; line-height: 1.75; color: var(--body); }
.article .body > * + * { margin-top: 18px; }
.article .body h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); font-weight: 200; letter-spacing: -0.015em; color: var(--text); margin-top: 56px; line-height: 1.2; }
.article .body h3 { font-size: 1.0625rem; font-weight: 500; color: var(--text); margin-top: 34px; }
.article .body h2 + *, .article .body h3 + * { margin-top: 14px; }
.article .body a { color: var(--text); border-bottom: 1px solid var(--faint); transition: border-color 0.2s; }
.article .body a:hover { border-color: var(--muted); }
.article .body strong { font-weight: 500; color: var(--text); }
.article .body ul, .article .body ol { padding-left: 1.3em; }
.article .body ul { list-style: disc; }
.article .body ol { list-style: decimal; }
.article .body li { margin-top: 8px; }
.article .body li::marker { color: var(--muted); }
.article .body blockquote { padding-left: 18px; border-left: 1px solid var(--faint); color: var(--text); font-weight: 300; }
.article .body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.article .body th, .article .body td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.article .body th { font-weight: 500; color: var(--text); }
.article .body td:first-child { color: var(--text); }
.article .body .note { font-size: 14px; color: var(--muted); }

/* call to action boxes (same capsule buttons as the homepage) */
.cta-box { margin-top: 56px; padding: 30px 28px; border: 1px solid var(--hair); border-radius: 22px; text-align: center; }
.cta-box h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); font-weight: 200; letter-spacing: -0.015em; color: var(--text); margin: 0; }
.cta-box p { margin-top: 10px; font-size: 15px; font-weight: 300; color: var(--body); }
.cta-box .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.cta-box.is-quiet { border: 0; padding: 0; margin-top: 44px; }
.cta-box small { display: block; margin-top: 14px; font-size: 13px; font-weight: 300; color: var(--muted); }

/* related pages */
.related { margin-top: 64px; border-top: 1px solid var(--hair); padding-top: 28px; }
.related .eyebrow { margin-bottom: 14px; }
.related ul { display: grid; gap: 10px; }
.related li a { display: block; padding: 14px 16px; border: 1px solid var(--hair); border-radius: 14px; color: var(--text); font-size: 15px; font-weight: 300; transition: background-color 0.2s, border-color 0.2s; }
.related li a:hover { background: var(--fill); border-color: var(--faint); }
.related li a small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
@media (min-width: 640px) { .related ul { grid-template-columns: 1fr 1fr; } }

/* tool pages: the writer sits first, the words come after */
.tool-head { padding-top: 18px; max-width: 680px; margin-inline: auto; text-align: center; }
.tool-head h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); font-weight: 200; letter-spacing: -0.025em; line-height: 1.05; }
.tool-head .lead { margin: 16px auto 0; }
.tool { margin-top: 36px; }
.tool .writer { max-width: 820px; }
.tool-prompt { max-width: 820px; margin: 0 auto 14px; padding: 12px 18px; border: 1px solid var(--hair); border-radius: 14px; font-size: 15px; font-weight: 300; color: var(--text); text-align: center; }
.tool-prompt[hidden] { display: none; }
.writer-meta { display: flex; justify-content: center; gap: 18px; padding: 10px 16px 0; font-size: 13px; font-weight: 300; color: var(--muted); font-variant-numeric: tabular-nums; }
.writer-finish { display: flex; justify-content: center; padding: 0 16px 14px; }
.writer-finish[hidden] { display: none; }
.pages-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px 20px 0; }
.pages-bar span { position: relative; height: 3px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.pages-bar span::after { content: ""; position: absolute; inset: 0; width: calc(var(--p, 0) * 100%); background: var(--text); transition: width 0.3s var(--ease); }
.pages-labels { display: flex; justify-content: space-between; padding: 6px 20px 0; font-size: 11px; font-weight: 300; color: var(--muted); }
.tool .writer textarea { min-height: 380px; }
.tool-privacy { margin-top: 18px; text-align: center; }
.tool-privacy a { color: var(--body); border-bottom: 1px solid var(--faint); }
.tool-article { padding-top: 56px; }
.tool-article .body { margin-top: 0; }

/* nav: more links fit on article pages */
.nav-links a[aria-current] { color: var(--text); }

/* footer with more links */
.footer-links { flex-wrap: wrap; row-gap: 10px; }

/* 404 */
.lost { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: var(--nav-h); }
.lost h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); font-weight: 200; letter-spacing: -0.025em; }
.lost p { margin-top: 18px; font-size: 17px; font-weight: 300; color: var(--body); max-width: 34em; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

@media (max-width: 640px) {
  .article { padding-top: 20px; }
  .article .body { font-size: 16px; }
  .cta-box { padding: 24px 18px; }
  .cta-box .actions .btn { width: 100%; }
  .tool .writer textarea { min-height: 300px; }
  .writer-meta { flex-wrap: wrap; gap: 8px 16px; }
}

/* prompt library (journal prompts) */
.jump .eyebrow { margin-bottom: 10px; }
.article .body .jump ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding-left: 0; }
.article .body .jump li { margin-top: 0; }
.article .body .jump a { display: inline-block; padding: 6px 13px; border: 1px solid var(--hair); border-radius: 999px; font-size: 14px; color: var(--body); transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.article .body .jump a:hover { background: var(--fill); border-color: var(--faint); color: var(--text); }
.random { display: none; }
.js .random { display: block; }
.random-out { margin-top: 14px; padding: 12px 18px; border: 1px solid var(--hair); border-radius: 14px; color: var(--text); }
.random-out.is-off { display: none; }
.random-out a { margin-left: 8px; font-size: 14px; color: var(--muted); }
.article .body .prompts { list-style: none; padding-left: 0; }
.article .body .prompts li { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 0; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.article .body .prompts li span { color: var(--text); }
.article .body .prompts .btn { flex: none; }
@media (max-width: 640px) {
  .article .body .prompts li { flex-direction: column; align-items: flex-start; gap: 10px; }
}
