/* =========================================================
   article.css — shared styles for fastingplans blog + guides
   Sidebar TOC layout · serene palette (+ golden / botanical)
   Matches homepage design tokens exactly.
========================================================= */

:root {
  --bg: #f6f2ea;
  --bg-2: #efe8dc;
  --surface: #fbf8f2;
  --ink: #171512;
  --ink-2: #3c3730;
  --muted: #7a7168;
  --line: #d9cfbe;
  --accent: #3d4a3a;
  --accent-2: #b8956a;
  --hot: #c4552b;
  --radius: 4px;
  --radius-lg: 20px;
}
html[data-theme="golden"] {
  --bg: #f3ece0; --bg-2: #ead9c0; --surface: #f9f1e4;
  --ink: #2a1a0c; --ink-2: #4a321c; --muted: #8a6f55;
  --line: #d9c4a4; --accent: #c45a1f; --accent-2: #8b5a2b; --hot: #a83a14;
}
html[data-theme="botanical"] {
  --bg: #ecebe3; --bg-2: #dcdcd0; --surface: #f4f3ea;
  --ink: #12211a; --ink-2: #23362c; --muted: #6a7a6f;
  --line: #b9c2b2; --accent: #2d5a3d; --accent-2: #8a7a4a; --hot: #b84a2b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
html, body { background: var(--bg); color: var(--ink); font-family: "Inter Tight", system-ui, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }

.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.serif-i { font-family: "Instrument Serif", Georgia, serif; font-style: italic; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }
a { color: inherit; }

/* ===== Reading progress bar ===== */
.progress-track { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width .1s linear; }

/* ===== NAV (shared with homepage) ===== */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; background: conic-gradient(from -90deg, var(--accent) 0deg 280deg, transparent 280deg 360deg); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg); }
.brand-name { font-family: "Instrument Serif", serif; font-size: 22px; letter-spacing: -0.01em; }
.brand-name em { font-style: italic; color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.nav-cta { background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 500; border: none; cursor: pointer; text-decoration: none; white-space: nowrap; }
@media (max-width: 820px) { .nav-links .hide-sm { display: none; } }

/* ===== Article hero ===== */
.article-hero { padding: 56px 0 40px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 28px; flex-wrap: wrap; }
.breadcrumb a { text-decoration: none; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }
.article-category { color: var(--accent); font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 20px; }
h1.article-title {
  font-family: "Instrument Serif", serif;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04; letter-spacing: -0.025em; max-width: 16ch;
}
h1.article-title em { font-style: italic; color: var(--accent); }
.article-standfirst { margin-top: 48px; font-size: 21px; line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.article-meta { display: flex; gap: 20px; align-items: center; margin-top: 28px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.article-meta .author { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.article-meta .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: var(--bg); font-family: "Instrument Serif", serif; font-size: 16px; }
.article-meta .dot { opacity: .5; }

.article-cover { margin: 8px 0 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 21/9; background: var(--bg-2); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.92); }
@media (max-width: 720px) { .article-cover { aspect-ratio: 4/3; } }

/* ===== Layout: sidebar TOC + prose ===== */
.article-body { padding: 56px 0 40px; }
.article-grid { display: grid; grid-template-columns: 220px 1fr; gap: 64px; align-items: start; }
@media (max-width: 980px) { .article-grid { grid-template-columns: 1fr; gap: 0; } }

.toc { position: sticky; top: 92px; }
@media (max-width: 980px) { .toc { display: none; } }
.toc-label { font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: block; text-decoration: none; color: var(--muted); font-size: 13.5px; line-height: 1.35; padding: 7px 0 7px 14px; border-left: 2px solid transparent; transition: all .2s; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.toc .read-time { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.toc .read-time strong { color: var(--ink); font-family: "Instrument Serif", serif; font-size: 22px; font-weight: 400; }

/* ===== Prose ===== */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 24px; }
.prose p { font-size: 18px; line-height: 1.72; color: var(--ink-2); text-wrap: pretty; }
.prose p .lead-cap::first-letter { } /* reserved */
.prose h2 {
  font-family: "Instrument Serif", serif; font-weight: 400;
  font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink);
  margin-top: 56px; scroll-margin-top: 92px;
}
.prose h2 em { font-style: italic; color: var(--accent); }
.prose h3 { font-family: "Inter Tight", sans-serif; font-weight: 600; font-size: 21px; color: var(--ink); margin-top: 40px; }
.prose a.inline { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose a.inline:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin-top: 10px; padding-left: 6px; }
.prose li::marker { color: var(--accent); }

.prose blockquote {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 28px; margin: 40px 0;
  font-family: "Instrument Serif", serif; font-size: 30px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink);
}
.prose blockquote cite { display: block; margin-top: 12px; font-family: "JetBrains Mono", monospace; font-size: 11px; font-style: normal; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

.prose figure { margin: 40px 0; }
.prose figure img { width: 100%; border-radius: 14px; display: block; filter: saturate(0.92); }
.prose figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; font-family: "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .06em; }

/* Key-stat callout row */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 40px 0; }
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr; } }
.stat-row .cell { background: var(--surface); padding: 22px 20px; }
.stat-row .n { font-family: "Instrument Serif", serif; font-size: 40px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.stat-row .n em { font-style: italic; color: var(--accent); }
.stat-row .l { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Callout / note box */
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; margin: 36px 0; }
.callout .k { font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 10px; }
.callout p { font-size: 16px !important; line-height: 1.6; color: var(--ink-2); }
.callout.warn { border-color: color-mix(in srgb, var(--hot) 40%, var(--line)); }
.callout.warn .k { color: var(--hot); }

/* ===== Recipe / nutrition cards ===== */
.recipe-cards { margin: 44px 0; }
.recipe-cards .rc-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.recipe-cards .rc-head h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 28px; margin: 0; }
.recipe-cards .rc-head h3 em { font-style: italic; color: var(--accent); }
.recipe-cards .rc-head .note { color: var(--muted); font-size: 13px; }
.rc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .rc-grid { grid-template-columns: 1fr; } }
.rc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.rc .rc-img { aspect-ratio: 3/2; background: var(--bg-2); overflow: hidden; }
.rc .rc-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92); }
.rc .rc-text { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rc .rc-tag { font-family: "JetBrains Mono", monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.rc h4 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 22px; line-height: 1.15; color: var(--ink); }
.rc p { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.rc .rc-macros { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; gap: 14px; }
.rc .rc-macros .m { display: flex; flex-direction: column; }
.rc .rc-macros .m .mv { font-family: "Instrument Serif", serif; font-size: 18px; color: var(--ink); }
.rc .rc-macros .m .mk { font-family: "JetBrains Mono", monospace; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Pros / cons */
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0; }
@media (max-width: 560px) { .pc { grid-template-columns: 1fr; } }
.pc .col { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.pc .col h4 { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.pc .col.pro h4 { color: var(--accent); }
.pc .col.con h4 { color: var(--hot); }
.pc .col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pc .col li { font-size: 15px; line-height: 1.5; color: var(--ink-2); padding-left: 22px; position: relative; margin: 0; }
.pc .col.pro li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.pc .col.con li::before { content: "–"; position: absolute; left: 0; color: var(--hot); font-weight: 700; }

/* Quick-facts table (guides) */
.facts { width: 100%; border-collapse: collapse; margin: 36px 0; font-size: 15px; }
.facts tr { border-bottom: 1px solid var(--line); }
.facts tr:first-child { border-top: 1px solid var(--line); }
.facts th { text-align: left; padding: 14px 16px 14px 0; font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 400; white-space: nowrap; vertical-align: top; width: 38%; }
.facts td { padding: 14px 0; color: var(--ink-2); }

/* ===== References ===== */
.references { margin: 64px 0 0; padding-top: 32px; border-top: 1px solid var(--line); }
.references h2 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 28px; margin-bottom: 20px; }
.references ol { padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.references li { font-size: 14px; line-height: 1.5; color: var(--muted); padding-left: 6px; }
.references li::marker { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--accent); }
.references a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.references .disclaimer { margin-top: 24px; font-size: 13px; color: var(--muted); font-style: italic; line-height: 1.6; }

/* ===== Related / next ===== */
.related { padding: 64px 0 0; }
.related .rel-head { font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 820px) { .rel-grid { grid-template-columns: 1fr; gap: 20px; } }
.rel-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.rel-card .rc-cover { aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; background: var(--bg-2); margin-bottom: 16px; }
.rel-card .rc-cover img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92); transition: transform .4s ease; }
.rel-card:hover .rc-cover img { transform: scale(1.04); }
.rel-card .rc-cat { font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 8px; }
.rel-card h4 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 22px; line-height: 1.15; color: var(--ink); }

/* ===== Newsletter band ===== */
.cta-band { background: var(--ink); color: var(--bg); border-radius: var(--radius-lg); padding: 56px 48px; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; margin: 72px 0 0; }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; padding: 40px 26px; } }
.cta-band::before { content: ""; position: absolute; top: -50%; right: -20%; width: 460px; height: 460px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 50%, transparent) 0%, transparent 60%); }
.cta-band h2 { font-family: "Instrument Serif", serif; font-size: clamp(30px, 4vw, 44px); line-height: 1; letter-spacing: -0.02em; position: relative; }
.cta-band h2 em { font-style: italic; color: var(--accent-2); }
.cta-band p { color: color-mix(in srgb, var(--bg) 70%, transparent); margin-top: 14px; font-size: 15px; max-width: 440px; position: relative; }
.cta-form { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.cta-form input { flex: 1; min-width: 200px; background: transparent; border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent); color: var(--bg); padding: 14px 18px; border-radius: 99px; font-family: inherit; font-size: 14px; }
.cta-form input::placeholder { color: color-mix(in srgb, var(--bg) 50%, transparent); }
.cta-form input:focus { outline: none; border-color: var(--accent-2); }
.cta-form button { background: var(--bg); color: var(--ink); border: none; padding: 14px 24px; border-radius: 99px; font-size: 14px; font-weight: 500; cursor: pointer; }

/* ===== Footer (shared) ===== */
footer { padding: 72px 0 40px; border-top: 1px solid var(--line); margin-top: 80px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h5 { font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 16px; }
.foot-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.foot-grid a:hover { color: var(--accent); }
.foot-intro p { color: var(--ink-2); max-width: 320px; margin-top: 14px; font-size: 14px; line-height: 1.55; }
.foot-bottom { display: flex; justify-content: space-between; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; flex-wrap: wrap; gap: 12px; }

/* ===== Ad slot ===== */
.ad-slot { margin: 48px auto; max-width: 68ch; min-height: 90px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.ad-slot .ad-label { font-family: "JetBrains Mono", monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

/* ===== FAQ block (article pages) ===== */
.faq-block { margin: 56px 0 0; }
.faq-block > h2 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 8px; scroll-margin-top: 92px; }
.faq-block > h2 em { font-style: italic; color: var(--accent); }
.faq-item { border-top: 1px solid var(--line); padding: 0; }
.faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; list-style: none; cursor: pointer; padding: 22px 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .q { font-family: "Instrument Serif", serif; font-size: 22px; line-height: 1.25; color: var(--ink); }
.faq-item summary .plus { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: all .2s; position: relative; }
.faq-item summary .plus::before, .faq-item summary .plus::after { content: ""; position: absolute; width: 11px; height: 1.5px; background: var(--ink); transition: all .2s; }
.faq-item summary .plus::after { transform: rotate(90deg); }
.faq-item[open] summary .plus { background: var(--ink); border-color: var(--ink); transform: rotate(45deg); }
.faq-item[open] summary .plus::before, .faq-item[open] summary .plus::after { background: var(--bg); }
.faq-item .fa { padding: 0 0 24px; color: var(--ink-2); font-size: 16px; line-height: 1.65; max-width: 64ch; }
