/* ForadHealth Health Journal: listing, article and comments (works with site.css) */
:root { --primary: #1F4D36; --primary-dark: #143424; --primary-light: #E3EFE7; --slate: #13231B; --muted: #4B5E54; --border: #DCE5DF; --bg: #F3F6F4; }
.j-page { background: #fff; }
.j-hero { background: radial-gradient(900px 380px at 90% -20%, #DDF0E3 0, rgba(221,240,227,0) 60%), linear-gradient(180deg, #F6FAF7, #fff); padding: 48px 0 28px; }
.j-hero h1 { font-family: 'Sora', sans-serif; font-size: clamp(30px, 4.4vw, 48px); font-weight: 600; letter-spacing: -0.02em; margin: 10px 0 10px; color: var(--slate); }
.j-hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0; }
.j-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.j-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.j-search input { width: 100%; height: 48px; border-radius: 14px; border: 1.5px solid var(--border); padding: 0 14px 0 42px; font: inherit; background: #fff; }
.j-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,77,54,.15); }
.j-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.j-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.j-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; font-weight: 600; font-size: 14px; color: var(--slate); cursor: pointer; }
.j-chip[aria-pressed="true"] { background: var(--slate); border-color: var(--slate); color: #fff; }

.j-listing { padding: 28px 0 64px; }
.j-featured { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; border-radius: 26px; overflow: hidden; background: #fff; border: 1px solid #EEF2EF; box-shadow: 0 10px 30px rgba(19,35,27,.07); text-decoration: none; color: inherit; margin-bottom: 28px; }
.j-featured .cover { min-height: 320px; background: var(--primary-light) center/cover no-repeat; }
.j-featured .in { padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.j-featured h2 { font-family: 'Sora', sans-serif; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; margin: 10px 0; color: var(--slate); }
.j-featured p { color: var(--muted); margin: 0 0 16px; }
@media (max-width: 860px) { .j-featured { grid-template-columns: 1fr; } .j-featured .cover { min-height: 220px; } }
.j-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.j-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #EEF2EF; border-radius: 22px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(19,35,27,.05); transition: transform .2s, box-shadow .2s; }
.j-card:hover, .j-card:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(19,35,27,.1); color: inherit; }
.j-card-cover { aspect-ratio: 16 / 9; background: var(--primary-light) center/cover no-repeat; }
.j-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.j-card h2, .j-card h3 { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0; color: var(--slate); }
.j-card p { color: var(--muted); font-size: 14.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.j-card-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.j-readmore { font-weight: 700; color: var(--primary); }
.j-card-stats { display: inline-flex; gap: 12px; color: var(--muted); } .j-card-stats i { margin-right: 4px; } .j-card-stats .fa-heart { color: #C0502A; }
.j-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 13px; color: var(--muted); }
.j-topic { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--primary-light); color: var(--primary); }
.j-empty, .j-loading { text-align: center; color: var(--muted); padding: 48px 12px; grid-column: 1 / -1; }
.j-app-cta { margin-top: 40px; background: linear-gradient(135deg, #1F4D36, #13231B); color: #fff; border-radius: 24px; padding: 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.j-app-cta h2 { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 600; margin: 0 0 4px; color: #fff; } .j-app-cta p { margin: 0; color: #CFE3D5; }

/* ---------- article ---------- */
.j-article-wrap { max-width: 780px; margin: 0 auto; padding: 28px 20px 64px; }
.j-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--primary); margin-bottom: 18px; }
.j-article h1 { font-family: 'Sora', sans-serif; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; margin: 10px 0 12px; color: var(--slate); }
.j-article-cover { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 22px; margin: 18px 0 8px; background: var(--primary-light); display: block; }
.j-byline { display: flex; align-items: center; gap: 12px; }
.j-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.j-body { font-size: 1.08rem; line-height: 1.75; color: #1D2B23; }
.j-body h2 { font-family: 'Sora', sans-serif; font-size: 1.4rem; font-weight: 600; margin: 34px 0 10px; color: var(--slate); }
.j-body p { margin: 0 0 16px; } .j-body ul { margin: 0 0 18px; padding-left: 22px; } .j-body li { margin-bottom: 6px; }
.j-body strong { color: var(--slate); }
.j-cite a { text-decoration: none; font-weight: 700; font-size: 0.78em; }
.j-refs-title { border-top: 1px solid var(--border); padding-top: 22px; }
.j-body ol { margin: 0 0 18px; padding-left: 24px; }
.j-body ol.j-refs { font-size: 0.9rem; color: #334155; } .j-body ol.j-refs li { margin-bottom: 8px; word-break: break-word; } .j-body ol.j-refs li:target { background: #fef9e7; border-radius: 6px; }
.j-figure { margin: 26px 0; } .j-figure img { width: 100%; border-radius: 16px; display: block; } .j-figure figcaption { font-size: 0.86rem; color: var(--muted); margin-top: 8px; text-align: center; }
.j-chart { margin: 28px 0; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 20px 20px 16px; }
.j-chart-title { font-weight: 700; font-size: 1rem; margin-bottom: 14px; color: var(--slate); }
.j-chart-source { font-size: 0.8rem; color: var(--muted); margin-top: 12px; }
.j-svgchart { width: 100%; height: auto; display: block; }
.j-svgchart .j-ax { font-size: 11px; fill: #64748b; font-family: inherit; } .j-svgchart .j-val { font-size: 12px; font-weight: 700; fill: #0f172a; font-family: inherit; }
.j-donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; } .j-donut svg { width: 200px; height: 200px; flex: none; }
.j-legend { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; flex: 1 1 220px; } .j-legend li { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.j-legend span { width: 14px; height: 14px; border-radius: 4px; flex: none; } .j-legend strong { margin-left: auto; }
.j-hbars { display: flex; flex-direction: column; gap: 14px; } .j-hbar-label { font-size: 0.88rem; margin-bottom: 5px; }
.j-hbar-track { display: flex; align-items: center; gap: 10px; } .j-hbar-fill { height: 22px; border-radius: 6px; } .j-hbar-val { font-weight: 700; font-size: 0.88rem; white-space: nowrap; }
.j-disclaimer { margin-top: 28px; padding: 14px 16px; border-radius: 14px; background: #FDECEC; color: #7F1D1D; font-size: 14px; }

/* like & share bar */
.j-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 8px; }
.j-like-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 1.5px solid var(--border); background: #fff; color: var(--slate); border-radius: 999px; padding: 0 16px; font-weight: 700; font-size: 0.92rem; cursor: pointer; transition: all .2s; }
.j-like-btn i { color: #C0502A; } .j-like-btn:hover { border-color: #C0502A; } .j-like-btn.liked { background: #FDECEA; border-color: #F3B8A8; } .j-like-btn.liked i { animation: jPop .35s ease; }
@keyframes jPop { 50% { transform: scale(1.35); } }
.j-share { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; } .j-share > span { font-size: 0.85rem; color: var(--muted); font-weight: 600; margin-right: 2px; }
.j-share a, .j-share button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--slate); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.j-share a:hover, .j-share button:hover { border-color: var(--primary); color: var(--primary); }
.j-share .wide { width: auto; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 0.85rem; }

/* comments */
.j-comments { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.j-comments h2 { font-family: 'Sora', sans-serif; font-size: 1.35rem; font-weight: 600; margin: 0 0 16px; }
.j-comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid #EEF2EF; }
.j-comment:first-of-type { border-top: 0; }
.j-comment .who { font-weight: 700; color: var(--slate); } .j-comment .when { color: var(--muted); font-size: 13px; }
.j-comment p { margin: 4px 0 8px; white-space: pre-wrap; }
.j-c-like { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.j-c-like i { color: #C0502A; } .j-c-like:hover { border-color: #C0502A; } .j-c-like.liked { background: #FDECEA; border-color: #F3B8A8; color: #9A3412; }
.j-form { background: var(--bg); border-radius: 20px; padding: 20px; margin-top: 22px; }
.j-form h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; }
.j-note { font-size: 0.85rem; color: var(--muted); margin: 0 0 14px; }
.j-input, .j-textarea { width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 13px; font: inherit; background: #fff; }
.j-input:focus, .j-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,77,54,.15); }
.j-textarea { min-height: 110px; resize: vertical; } .j-field { margin-bottom: 12px; } .j-label { display: block; font-weight: 700; font-size: 0.86rem; margin-bottom: 5px; }
.j-cap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .j-cap img { border-radius: 8px; border: 1px solid var(--border); } .j-cap .j-input { width: 110px; text-align: center; font-weight: 700; }
.j-cap button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #fff; }
.j-status { font-size: 0.9rem; margin-top: 10px; } .j-status.ok { color: var(--primary); font-weight: 600; } .j-status.err { color: #B91C1C; font-weight: 600; }
.j-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.j-section { margin-top: 44px; } .j-section h2 { font-family: 'Sora', sans-serif; font-size: 1.3rem; font-weight: 600; margin: 0 0 14px; }
.j-related { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.j-popular { list-style: none; margin: 0; padding: 0; counter-reset: pop; } .j-popular li { counter-increment: pop; border-top: 1px solid #EEF2EF; }
.j-popular a { display: flex; gap: 14px; align-items: center; padding: 12px 0; text-decoration: none; color: inherit; }
.j-popular a::before { content: counter(pop); font-family: 'Sora', sans-serif; font-weight: 700; font-size: 26px; color: #C5D0CA; min-width: 26px; }
.j-popular strong { display: block; line-height: 1.35; } .j-popular small { color: var(--muted); }

/* modal */
.j-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(19,35,27,.55); display: none; align-items: center; justify-content: center; padding: 16px; }
.j-modal.open { display: flex; } body.j-modal-open { overflow: hidden; }
.j-modal-box { background: #fff; border-radius: 24px; max-width: 860px; width: 100%; max-height: 90vh; overflow: auto; padding: 24px; }
.j-modal-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; } .j-modal-head h3 { font-family: 'Sora', sans-serif; margin: 0 0 4px; } .j-modal-head p { color: var(--muted); margin: 0; }
.j-modal-close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg); font-size: 22px; flex: none; }
.j-ext-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.j-ext { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; text-decoration: none; color: inherit; }
.j-ext:hover { border-color: var(--primary); } .j-ext small { color: var(--muted); } .j-ext span { color: var(--muted); font-size: 14px; } .j-ext em { color: var(--primary); font-style: normal; font-weight: 700; font-size: 13px; margin-top: auto; }
.j-modal-foot { font-size: 13px; color: var(--muted); margin-top: 14px; }
.j-comments h2, .j-section h2, .j-form h3, .j-hero h1, .j-article h1 { color: var(--slate); }
.j-card-cover:not([style]), .j-featured .cover:not([style]) { background: var(--primary-light) url("foradhealth-mark.png") center / 56px no-repeat; }
