/* ============================================================
   article.css — long-form Resource Hub prose + visuals
   Loaded ALONGSIDE style.css. Reuses its tokens, buttons,
   tape, ticker, sticky bar, .compare table, FAQ, footer.
   ============================================================ */

/* ---------- breadcrumb ---------- */
.breadcrumb { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.breadcrumb ol {
  max-width: 1180px; margin: 0 auto; padding: 12px 24px;
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 0.82rem; color: var(--slate);
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "›"; color: var(--caution-dark); font-weight: 900; }
.breadcrumb a { color: var(--slate); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--alert); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--navy); font-weight: 700; }

/* ---------- article shell ---------- */
.article { padding: 40px 0 20px; }
.article .wrap { max-width: 820px; }
.reading { max-width: 760px; }
.article h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 900; color: var(--navy);
  margin-bottom: 14px; line-height: 1.1;
}
.article h1 .hl {
  text-decoration: underline; text-decoration-color: var(--caution);
  text-decoration-thickness: 0.14em; text-underline-offset: 0.16em;
}
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  font-size: 0.9rem; color: var(--slate); font-weight: 600;
  padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.byline .author { color: var(--navy); font-weight: 800; }
.byline .author b { color: var(--alert); }
.byline .dot { color: var(--caution-dark); }
.byline .read-time { display: inline-flex; align-items: center; gap: 6px; }

.article-hero {
  margin: 24px 0 8px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.article-hero img { width: 100%; display: block; }
.article-hero figcaption {
  font-size: 0.78rem; color: var(--slate); background: var(--paper-2);
  padding: 8px 14px; text-align: center;
}

/* ---------- prose ---------- */
.prose { font-size: 1.06rem; color: var(--ink); line-height: 1.72; }
.prose > p { margin: 0 0 18px; }
.prose h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 900; color: var(--navy);
  margin: 42px 0 14px; padding-top: 8px; scroll-margin-top: 90px;
}
.prose h3 { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin: 26px 0 10px; }
.prose strong, .prose b { color: var(--ink); font-weight: 800; }
.prose a { color: var(--safe-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.prose a[target="_blank"]::after { content: " ↗"; font-size: 0.8em; color: var(--slate); }
/* call buttons must render exactly like the homepage's approved buttons —
   green fill, WHITE text, orange outline — never inherit prose-link styling */
.prose a.btn, .prose a.btn:hover, .prose a.btn:visited { color: #fff; text-decoration: none; }
.prose a.btn[target="_blank"]::after { content: none; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 4px; list-style: none; }
.prose ol { counter-reset: li; }
.prose ul li, .prose ol li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.prose ul li::before { content: "›"; position: absolute; left: 8px; top: -1px; color: var(--safe); font-weight: 900; font-size: 1.1em; }
.prose ol li { counter-increment: li; }
.prose ol li::before {
  content: counter(li); position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Key Takeaways (TL;DR / AEO answer) ---------- */
.tldr {
  background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--navy);
  border-radius: var(--radius); padding: 22px 26px; margin: 26px 0;
  box-shadow: var(--shadow);
}
.tldr h2 {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 900; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.tldr h2::before { content: "★"; color: var(--caution-dark); }
.tldr ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.tldr li { position: relative; padding-left: 26px; font-size: 1rem; color: var(--ink); line-height: 1.55; }
.tldr li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--safe); font-weight: 900; }
.tldr b { color: var(--navy); }

/* ---------- Table of Contents ---------- */
.toc {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 26px 0;
}
.toc h2 {
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 900; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px;
}
/* TOC lists live inside .prose, so they reuse the body-list navy circle
   numbering (from .prose ol li). No separate counter — that caused a
   double number ("1" + "00"). */
.toc ol { list-style: none; display: grid; gap: 10px; margin: 0; }
.toc a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 0.96rem; }
.toc a:hover { color: var(--alert); text-decoration: underline; }

/* ---------- callout (tip) + alert-box (trap) ---------- */
.callout {
  background: #fffbe6; border: 1px solid var(--caution); border-left: 5px solid var(--caution-dark);
  border-radius: 12px; padding: 16px 20px; margin: 22px 0; font-size: 0.98rem;
}
.callout .c-label { display: block; font-family: var(--font-display); font-weight: 900; color: var(--ink); text-transform: uppercase; font-size: 0.76rem; letter-spacing: 0.06em; margin-bottom: 4px; }
.alert-box {
  background: var(--alert-bg); border: 1px solid rgba(217,45,32,.3); border-left: 5px solid var(--alert);
  border-radius: 12px; padding: 16px 20px; margin: 22px 0; font-size: 0.98rem;
}
.alert-box .c-label { display: block; font-family: var(--font-display); font-weight: 900; color: var(--alert); text-transform: uppercase; font-size: 0.76rem; letter-spacing: 0.06em; margin-bottom: 4px; }

/* ---------- data table (extends style.css .compare) ---------- */
.figure { margin: 28px 0; }
.figure figcaption { font-size: 0.82rem; color: var(--slate); margin-top: 8px; text-align: center; font-style: italic; }
.compare td b, .compare td strong { color: var(--navy); }
.cell-yes { color: var(--safe-dark); font-weight: 800; }
.cell-no { color: var(--alert); font-weight: 800; }

/* ---------- step-flow diagram (numbered) ---------- */
.stepflow { display: grid; gap: 0; margin: 28px 0; counter-reset: sf; }
.stepflow .sf-node {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px 16px 62px; box-shadow: var(--shadow); counter-increment: sf;
}
.stepflow .sf-node + .sf-node { margin-top: 30px; }
.stepflow .sf-node::before {
  content: counter(sf); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff;
  font-family: var(--font-display); font-weight: 900; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.stepflow .sf-node + .sf-node::after {
  content: "▼"; position: absolute; left: 26px; top: -24px; color: var(--caution-dark); font-size: 0.85rem;
}
.stepflow .sf-node h4 { font-size: 1.02rem; font-weight: 800; color: var(--navy); margin-bottom: 3px; }
.stepflow .sf-node p { font-size: 0.94rem; color: var(--slate); margin: 0; }

/* ---------- decision tree ---------- */
.decision {
  margin: 28px 0; background: var(--navy); border-radius: var(--radius); padding: 26px 24px;
  color: #fff; box-shadow: var(--shadow);
}
.decision .dt-q {
  text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 1.1rem;
  color: var(--caution); margin-bottom: 20px;
}
.dt-branches { display: grid; gap: 14px; }
.dt-branch {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  background: rgba(255,255,255,.08); border-radius: 12px; padding: 14px 16px;
  border-left: 4px solid var(--caution);
}
.dt-branch .dt-if { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 0.9rem; white-space: nowrap; }
.dt-branch .dt-then { font-size: 0.95rem; color: rgba(255,255,255,.9); }
.dt-branch .dt-then b { color: var(--caution); }

/* ---------- bar / timeline chart (pure CSS) ---------- */
.barchart { margin: 26px 0; display: grid; gap: 14px; }
.barchart .bar-row { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; }
.barchart .bar-label { font-size: 0.9rem; font-weight: 700; color: var(--navy); text-align: right; }
.barchart .bar-track { background: var(--paper-2); border-radius: 999px; height: 34px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.barchart .bar-fill {
  height: 100%; border-radius: 999px; display: flex; align-items: center; padding: 0 14px;
  color: #fff; font-weight: 800; font-size: 0.86rem; white-space: nowrap;
  background: linear-gradient(90deg, var(--navy), #1c3d63);
  /* never let the green shrink narrower than its own label — otherwise the
     white text spills onto the cream track and disappears (short bars) */
  min-width: max-content; box-sizing: border-box;
}
.barchart .bar-fill.hi { background: linear-gradient(90deg, var(--alert), #e85d52); }
.barchart .bar-fill.ok { background: linear-gradient(90deg, var(--safe-dark), var(--safe)); }
@media (max-width: 560px) {
  .barchart .bar-row { grid-template-columns: 92px 1fr; }
  .barchart .bar-label { font-size: 0.78rem; }
}

/* timeline (availability days) */
.timeline { margin: 28px 0; position: relative; padding-left: 8px; }
.timeline-track { position: relative; height: 8px; background: var(--paper-2); border-radius: 999px; margin: 40px 10px; border: 1px solid var(--line); }
.timeline-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--safe), var(--caution), var(--alert)); }
.timeline-marks { display: flex; justify-content: space-between; }
.tm { position: relative; text-align: center; flex: 1; }
.tm .tm-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--navy); border: 3px solid #fff; box-shadow: var(--shadow); margin: 0 auto; }
.tm .tm-day { font-family: var(--font-display); font-weight: 900; color: var(--navy); font-size: 0.9rem; margin-top: 8px; }
.tm .tm-txt { font-size: 0.76rem; color: var(--slate); }

/* ---------- CTA box (navy gradient, 4 per article) ---------- */
.cta-box {
  background: linear-gradient(135deg, var(--navy), #123a63); color: #fff;
  border-radius: var(--radius); padding: 28px 26px; margin: 32px 0;
  box-shadow: var(--shadow-lg); text-align: center;
  border: 1px solid rgba(255,255,255,.08);
}
.cta-box h3 { font-size: 1.3rem; font-weight: 900; color: #fff; margin-bottom: 8px; }
.cta-box p { color: rgba(255,255,255,.85); font-size: 1rem; margin: 0 auto 18px; max-width: 34em; }
.cta-box .btn-call {
  border: 4px solid var(--pop); padding: 15px 28px; font-size: 1.15rem;
  width: auto; justify-content: center; display: inline-flex;
}
.cta-box .btn-call .i-phone { width: 1.4em; height: 1.4em; }
.cta-box .cta-micro { font-size: 0.82rem; opacity: 0.8; margin-top: 12px; font-weight: 600; }

/* ---------- author / E-E-A-T box ---------- */
.author-box {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin: 40px 0 24px;
}
.author-box .ab-badge {
  flex-shrink: 0; width: 66px; height: 66px; border-radius: 16px;
  background: var(--navy); color: var(--caution); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 1.6rem;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.25);
}
.author-box h3 { font-size: 1.1rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.author-box p { font-size: 0.94rem; color: var(--slate); margin-bottom: 8px; }
.author-box .ab-verify { font-size: 0.86rem; font-weight: 700; color: var(--safe-dark); }
.sources-list { margin: 18px 0 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sources-list li { position: relative; padding-left: 18px; font-size: 0.88rem; color: var(--slate); }
.sources-list li::before { content: "✓"; position: absolute; left: 0; color: var(--safe); font-weight: 900; }
.sources-list a { color: var(--safe-dark); font-weight: 700; }

/* ---------- related guides ---------- */
.related-guides { margin: 40px 0 10px; }
.related-guides h2 { font-size: 1.4rem; font-weight: 900; color: var(--navy); margin-bottom: 18px; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.rg-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease; border-top: 4px solid var(--safe);
}
.rg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.rg-card .rg-title { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1rem; line-height: 1.25; margin-bottom: 6px; }
.rg-card .rg-go { font-size: 0.85rem; font-weight: 800; color: var(--safe-dark); }

/* ---------- FAQ accordion (self-contained) ---------- */
.article-faq { padding: 20px 0 10px; }
.article-faq h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; color: var(--navy); margin-bottom: 22px; }
.article-faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(19,27,38,.05);
}
.article-faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  padding: 18px 52px 18px 22px; position: relative; color: var(--navy);
}
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper-2); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; transition: all .2s;
}
.article-faq details[open] summary::after { content: "–"; background: var(--caution); }
.article-faq details p { padding: 0 22px 20px; color: var(--slate); }
.article-faq details a { color: var(--safe-dark); font-weight: 700; }

/* ---------- Resource Hub index ---------- */
.hub-hero { padding: 56px 0 30px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.hub-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: var(--navy); margin-bottom: 12px; }
.hub-hero p { font-size: 1.12rem; color: var(--slate); max-width: 44em; }
.hub-section { padding: 40px 0 8px; }
.hub-section h2 {
  font-size: 1.4rem; font-weight: 900; color: var(--navy); margin-bottom: 4px;
  display: flex; align-items: center; gap: 12px;
}
.hub-section h2::before { content: ""; width: 12px; height: 26px; background: var(--caution); border-radius: 3px; }
.hub-section .hub-sub { color: var(--slate); margin: 0 0 18px 24px; font-size: 0.96rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.hub-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 18px; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
  border-top: 5px solid var(--safe);
}
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.hub-card .hc-title { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.12rem; line-height: 1.22; margin-bottom: 8px; }
.hub-card .hc-desc { font-size: 0.92rem; color: var(--slate); flex: 1; margin-bottom: 14px; }
.hub-card .hc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; font-weight: 700; }
.hub-card .hc-read { color: var(--slate); }
.hub-card .hc-go { color: var(--safe-dark); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .author-box { flex-direction: column; gap: 12px; }
  .decision { padding: 20px 16px; }
  .dt-branch { grid-template-columns: 1fr; gap: 6px; }
  .cta-box { padding: 24px 18px; }
  .cta-box .btn-call { width: 100%; }
  .stepflow .sf-node { padding-left: 58px; }
}
