/* ────────────────────────────────────────
   stories.css — GhanaChild Stories (22 Oct 2026)
   /stories/ list, story page, write form. Loaded after community.css.
   ──────────────────────────────────────── */

/* ── List ── */
.st-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1rem; }
@media (min-width: 640px)  { .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .st-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-card {
    display: flex; flex-direction: column; background: var(--off-white, #FAFAF7); border-radius: 12px; overflow: hidden;
    border-top: 4px solid var(--gold, #DAA520); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none; color: var(--charcoal, #1A1A1A); transition: transform .15s, box-shadow .15s;
}
.st-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10); }
.st-card.is-hidden { opacity: .65; }
.st-card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #efe7da; }
.st-card-noimg { display: flex; align-items: center; justify-content: center; font-size: 2.6rem; }
.st-card-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.2rem; }
.st-card-type { font-size: .8rem; font-weight: 600; color: var(--terracotta, #C1693C); }
.st-card-title { font-family: var(--serif, Georgia, serif); font-size: 1.15rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.st-card-trib { font-size: .88rem; color: var(--muted, #6B5E52); font-style: italic; }
.st-card-excerpt { font-size: .92rem; color: var(--muted, #6B5E52); overflow-wrap: anywhere; }
.st-card-meta { font-size: .8rem; color: var(--muted, #6B5E52); margin-top: .2rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.st-guest-note { margin: 1.2rem 0 0; padding: .8rem 1rem; background: rgba(218, 165, 32, .1); border-radius: 8px; font-size: .92rem; }

/* ── Tribute: calm look ── */
.st-card.st-tribute { border-top-color: #8C8478; background: #F7F5F2; }
.st-card.st-tribute .st-card-type { color: #6E675E; }
.st-story.st-tribute { border-top-color: #8C8478 !important; background: #FBFAF8; }

/* ── Story page ── */
.st-cover { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 10px; margin: 0 0 1.2rem; background: #efe7da; }
.st-type-line { font-size: .85rem; font-weight: 600; color: var(--terracotta, #C1693C); margin: 0 0 .3rem; }
.st-tribute .st-type-line { color: #6E675E; }
.st-trib-line { margin: -.2rem 0 .6rem; color: var(--muted, #6B5E52); font-size: 1rem; }
.st-content { font-size: 1.05rem; line-height: 1.75; }
.st-content p { margin: 0 0 1rem; }
.st-more { margin: 1rem 0 2rem; font-size: .95rem; }

/* ── Write form ── */
.st-types { border: 0; padding: 0; margin: 0 0 1.2rem; display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 640px) { .st-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-types legend, .st-vis legend { font-weight: 600; margin-bottom: .5rem; }
.st-type-opt { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem; border: 1px solid rgba(0, 0, 0, .12); border-radius: 10px; background: #fff; cursor: pointer; }
.st-type-opt input { margin-top: .25rem; accent-color: var(--terracotta, #C1693C); }
.st-type-opt span { display: flex; flex-direction: column; gap: .15rem; }
.st-type-opt small { color: var(--muted, #6B5E52); font-size: .82rem; }
.st-type-opt:has(input:checked) { border-color: var(--gold, #DAA520); background: rgba(218, 165, 32, .08); }
.st-vis { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .45rem; }
.st-inline { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.st-inline input { margin-top: .3rem; accent-color: var(--terracotta, #C1693C); }
.st-tribute-fields { background: #F7F5F2; border-radius: 10px; padding: .9rem 1rem .2rem; margin-bottom: 1rem; }
.st-cover-current { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.st-cover-current img { width: 240px; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }

/* Community form styles make labels full-width blocks — keep the story choice rows side by side */
.cm-form label.st-type-opt, .cm-form label.st-inline { display: flex; width: auto; }
.cm-form .st-type-opt input, .cm-form .st-inline input { width: auto; flex: 0 0 auto; }
.st-guest-note a, .st-more a { color: var(--terracotta, #C1693C); font-weight: 600; }

/* ── Part 2: people, reactions, replies (22 Oct 2026) ── */
.st-people-box { margin: 1.4rem 0 .4rem; padding: .9rem 1rem; background: #F7F5F2; border-radius: 10px; }
.st-people-h { font-size: .95rem; font-weight: 700; margin: 0 0 .5rem; font-family: var(--sans, inherit); }
.st-people-tags { list-style: none; padding: 0; margin: 0 0 .4rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.st-people-tags li { background: #fff; border: 1px solid rgba(0, 0, 0, .1); border-radius: 999px; padding: .25rem .75rem; font-size: .9rem; }
.st-people-tags li small { color: var(--muted, #6B5E52); }
.st-people-tags a { color: var(--terracotta, #C1693C); font-weight: 600; text-decoration: none; }
.st-untag { font-size: .82rem; }
.st-react-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: 1.2rem 0 .2rem; }
.st-react-bar .cm-inline-form { margin: 0; }
.st-react, .st-react-bar button.st-react { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid rgba(0, 0, 0, .15); background: #fff; font: inherit; font-weight: 600; font-size: .92rem; color: var(--charcoal, #1A1A1A); cursor: pointer; text-decoration: none; }
.st-react-bar button.st-react.is-on { background: rgba(193, 105, 60, .1); border-color: var(--terracotta, #C1693C); }
.st-tribute .st-react-bar button.st-react.is-on { background: #EFECE7; border-color: #8C8478; }
.st-react-static { cursor: default; }
.st-reply-jump { font-size: .92rem; color: var(--muted, #6B5E52); text-decoration: none; }
.st-replies.st-tribute { border-top-color: #8C8478 !important; background: #FBFAF8; }
.st-people { border: 0; padding: 0; margin: 0 0 1.2rem; }
.st-people legend { font-weight: 600; margin-bottom: .4rem; }
.st-people-list { display: grid; grid-template-columns: 1fr; gap: .35rem; margin-top: .4rem; }
@media (min-width: 640px) { .st-people-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-person small { color: var(--muted, #6B5E52); }
