/* Keto Therapy — articles (index + article pages). Classes are prefixed art-.
   Colours come from the site tokens in style.css, so light and dark mode follow automatically. */

/* Let wide tables scroll inside their box instead of widening the article column on phones */
.article-layout > .prose { min-width: 0; }

/* Author / date strip at the top of an article */
.art-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; margin: 0 0 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.art-meta img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; }
.art-meta__who { flex: 1 1 220px; min-width: 0; line-height: 1.35; }
.art-meta__who b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.02rem; }
.art-meta__who a { color: inherit; text-decoration: none; }
.art-meta__who a:hover { text-decoration: underline; }
.art-meta__who span { color: var(--muted); font-size: 0.9rem; }
.art-meta__when { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.art-meta__when span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.art-meta__when .icon { width: 16px; height: 16px; color: var(--accent-text); }

/* Quick answer box */
.art-answer { background: var(--surface-2); border: 1px solid var(--line); border-inline-start: 4px solid var(--lime); border-radius: 18px; padding: 20px 22px; margin: 0 0 36px; }
.art-answer p:first-child { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin-bottom: 0.4em; letter-spacing: 0.02em; }
.art-answer p:last-child, .art-answer ul:last-child { margin-bottom: 0; }

/* Tables (scroll sideways on small phones instead of breaking the page) */
.art-table { width: 100%; overflow-x: auto; margin: 1.4rem 0 1.8rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.art-table table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 0.95rem; }
.art-table th, .art-table td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.art-table thead th { font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--muted); background: var(--surface-2); }
.art-table tbody tr:last-child td { border-bottom: 0; }
.art-table td:first-child { font-weight: 600; color: var(--ink); }
.art-table .num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Traffic-light dots */
.art-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-inline-end: 8px; vertical-align: 0.02em; flex: none; }
.art-dot--green { background: #3fae4a; }
.art-dot--orange { background: #f08c00; }
.art-dot--red { background: #e03131; }
.art-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0.4rem 0 1rem; font-size: 0.92rem; color: var(--muted); }

/* Two-column food lists */
.art-lists { display: grid; gap: 14px; margin: 1.2rem 0 1.8rem; }
@media (min-width: 640px) { .art-lists { grid-template-columns: 1fr 1fr; } }
.art-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.art-list h3 { display: flex; align-items: center; margin: 0 0 0.6em; font-size: 1.08rem; }
.art-list ul { margin: 0; padding-inline-start: 1.1em; }
.art-list li { margin-bottom: 0.35em; }

/* Meal plan cards */
.art-day { display: grid; gap: 12px; margin: 1.2rem 0 1.8rem; }
.art-day > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.art-day b { display: block; font-family: var(--font-display); color: var(--accent-text); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
[lang="ar"] .art-day b { letter-spacing: 0; font-size: 0.95rem; }
.art-day p { margin: 0; }

/* Sources + related */
.art-sources { font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 28px; }
.art-sources h2 { font-size: 1.1rem !important; margin-bottom: 0.6em; }
.art-sources ol { padding-inline-start: 1.2em; }
.art-sources li { color: var(--muted); }
.art-related { display: grid; gap: 10px; margin: 1rem 0 2rem; padding: 0; list-style: none; }
.art-related a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; transition: border-color 0.2s; }
.art-related a:hover { border-color: var(--lime); }
.art-related .icon { width: 18px; height: 18px; color: var(--accent-text); flex: none; }
[dir="rtl"] .art-related .icon, [dir="rtl"] .art-card__go .icon { transform: scaleX(-1); }

/* Product mention inside an article */
.art-product { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); margin: 1.6rem 0; }
.art-product img { width: 96px; height: auto; border-radius: 10px; box-shadow: var(--shadow-sm); }
.art-product p { margin: 0 0 0.5em; }
.art-product p:last-child { margin: 0; }

/* Articles index */
.art-cards { display: grid; gap: 24px; }
@media (min-width: 720px) { .art-cards { grid-template-columns: repeat(2, 1fr); } }
.art-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.art-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--lime); }
.art-card__img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.art-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.art-card__tag { font-family: var(--font-display); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
[lang="ar"] .art-card__tag { letter-spacing: 0; font-size: 0.9rem; }
.art-card h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.25; margin: 0; color: var(--ink); }
.art-card p { margin: 0; color: var(--muted); }
.art-card__foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 0.88rem; }
.art-card__go { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 600; font-family: var(--font-display); }
.art-card__go .icon { width: 16px; height: 16px; }
.art-soon { margin-top: 40px; padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.art-soon h2 { font-size: 1.25rem; margin: 0 0 0.6em; }
.art-soon ul { margin: 0; padding-inline-start: 1.2em; color: var(--muted); }
.art-soon li { margin-bottom: 0.3em; }
