/* ============================================================
   articles.css — shared responsive styles for all article pages
   Mobile-first: base = smallest screen, enhanced upward
   ============================================================ */

/* ── Hero ──────────────────────────────────────────────────── */
.article-hero {
  background: linear-gradient(135deg, rgba(26,63,111,0.97) 0%, rgba(11,35,65,1) 100%);
  color: #fff;
  padding: 2rem 1rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 60%; height: 140%;
  background: radial-gradient(circle, rgba(200,155,60,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.article-hero > * { position: relative; z-index: 1; }
.article-hero-inner { max-width: 860px; margin: 0 auto; }

.article-breadcrumb {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.article-breadcrumb a { color: rgba(255,255,255,0.55); }
.article-breadcrumb a:hover { color: var(--gold); box-shadow: none; }
.article-breadcrumb span { color: rgba(255,255,255,0.3); }

.article-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(200,155,60,0.15);
  border: 1px solid rgba(200,155,60,0.4);
  color: var(--gold-lt);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.article-hero h1 {
  font-size: clamp(1.55rem, 6vw, 3rem);
  line-height: 1.12;
  margin: 0 0 0.9rem;
  font-weight: 700;
}

.article-hero > .article-hero-inner > p {
  font-size: 0.97rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  margin: 0 0 1.1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.8rem;
}
.article-meta-item { display: flex; align-items: center; gap: 0.3rem; }

/* ── Page layout ────────────────────────────────────────────── */
.article-outer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.article-layout {
  display: grid;
  gap: 1.25rem;
}

/* ── Table of Contents (uses <details> for mobile collapse) ── */
.toc {
  background: #fff;
  border: 1px solid rgba(11,35,65,0.08);
  border-radius: 13px;
  box-shadow: 0 3px 10px rgba(11,35,65,0.07);
  overflow: hidden;
}

.toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 0;
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.toc-title::-webkit-details-marker { display: none; }
.toc-title::marker { display: none; }
.toc-title::after {
  content: '▾';
  font-size: 0.85rem;
  opacity: 0.6;
  transition: transform 0.2s;
  margin-left: 0.5rem;
}
.toc[open] .toc-title::after { transform: rotate(180deg); }

.toc ol {
  margin: 0;
  padding: 0.25rem 1.1rem 0.9rem 2.1rem;
  border-top: 1px solid rgba(11,35,65,0.06);
}
.toc li { margin-bottom: 0.4rem; }
.toc a {
  font-size: 0.81rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}
.toc a:hover { color: var(--blue); box-shadow: none; }

/* ── Article body ───────────────────────────────────────────── */
.article-body h2 {
  font-size: clamp(1.15rem, 4.5vw, 1.65rem);
  color: var(--navy-dark);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid rgba(11,35,65,0.07);
  scroll-margin-top: 5rem;
  line-height: 1.25;
}
.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 1.02rem;
  color: var(--navy-dark);
  margin: 1.5rem 0 0.45rem;
  line-height: 1.35;
}

.article-body p,
.article-body li {
  /*color: var(--muted);*/
  line-height: 1.85;
  font-size: 0.97rem;
}
.article-body ul,
.article-body ol { padding-left: 1.35rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--navy-dark); }

/* ── Callouts ───────────────────────────────────────────────── */
.callout {
  border-radius: 11px;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}
.callout.blue  { background: #eef5ff; border-left: 4px solid var(--blue); }
.callout.gold  { background: #fef9ee; border-left: 4px solid var(--gold); }
.callout.green { background: #edfbf3; border-left: 4px solid #27ae60; }
.callout.red   { background: #fdf0f0; border-left: 4px solid #e74c3c; }
.callout-title {
  font-weight: 700;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.4rem;
}
.callout.blue  .callout-title { color: var(--blue); }
.callout.gold  .callout-title { color: #a07828; }
.callout.green .callout-title { color: #1a7a3f; }
.callout.red   .callout-title { color: #c0392b; }
.callout p,
.callout li { font-size: 0.92rem; margin: 0 0 0.3rem; line-height: 1.7; color: inherit; }
.callout p:last-child,
.callout li:last-child { margin: 0; }
.callout ul { margin: 0.35rem 0 0; padding-left: 1.15rem; }

/* ── Formula box ────────────────────────────────────────────── */
.formula-box {
  background: var(--navy-dark);
  color: #fff;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  line-height: 1.85;
}
.formula-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-lt);
  margin-bottom: 0.45rem;
  font-weight: 700;
  display: block;
}
.formula-main {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
  word-break: break-word;
  display: block;
}
.formula-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  display: block;
}

/* ── Example cards ──────────────────────────────────────────── */
.example-card {
  background: linear-gradient(135deg, #f0f6ff 0%, #fff 100%);
  border: 1px solid rgba(11,35,65,0.1);
  border-radius: 14px;
  padding: 1.1rem;
  margin: 1.5rem 0;
  box-shadow: 0 3px 12px rgba(11,35,65,0.07);
}
.example-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(11,35,65,0.08);
}
.example-avatar {
  width: 2.6rem;
  height: 2.6rem;
  min-width: 2.6rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.example-card h3 { margin: 0 0 0.15rem; font-size: 0.97rem; color: var(--navy-dark); }
.example-card .ex-subtitle { font-size: 0.79rem; color: var(--muted-light); margin: 0; line-height: 1.4; }

.example-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0.85rem 0;
}
.ex-stat {
  background: #fff;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(11,35,65,0.08);
}
.ex-stat-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-light);
  margin-bottom: 0.18rem;
}
.ex-stat-value { font-size: 0.9rem; font-weight: 700; color: var(--navy-dark); }
.ex-stat-value.blue  { color: var(--blue); }
.ex-stat-value.green { color: #27ae60; }
.ex-stat-value.red   { color: #e74c3c; }
.ex-stat-value.gold  { color: #a07828; }

.example-steps { margin: 0.75rem 0 0; }
.example-steps h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  margin: 0 0 0.55rem;
  font-weight: 700;
}
.example-steps ol { margin: 0; padding-left: 1.2rem; }
.example-steps li { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.4rem; line-height: 1.6; }
.example-verdict {
  margin-top: 0.85rem;
  padding: 0.8rem 0.95rem;
  border-radius: 9px;
  font-size: 0.88rem;
  line-height: 1.6;
}
.example-verdict.on-track   { background: #edfbf3; border-left: 4px solid #27ae60; color: #1a5c35; }
.example-verdict.needs-action { background: #fdf0f0; border-left: 4px solid #e74c3c; color: #8b2a1f; }

/* ── FIRE type cards ────────────────────────────────────────── */
.fire-types {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.fire-type {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(11,35,65,0.08);
  box-shadow: 0 2px 8px rgba(11,35,65,0.05);
  transition: transform 0.25s, box-shadow 0.25s;
}
.fire-type:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(11,35,65,0.09); }
.fire-type-emoji { font-size: 1.5rem; margin-bottom: 0.45rem; }
.fire-type h3 { margin: 0 0 0.3rem; font-size: 0.93rem; color: var(--navy-dark); }
.fire-type p { font-size: 0.82rem; color: var(--muted); line-height: 1.55; margin: 0 0 0.5rem; }
.fire-type-tag {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.17rem 0.5rem;
  border-radius: 999px;
  background: var(--frost);
  color: var(--navy);
}

/* ── Steps list ─────────────────────────────────────────────── */
.steps-list { list-style: none; padding: 0; counter-reset: steps; }
.steps-list li {
  counter-increment: steps;
  padding: 0.9rem 0.9rem 0.9rem 3rem;
  margin-bottom: 0.65rem;
  background: #fff;
  border-radius: 11px;
  border: 1px solid rgba(11,35,65,0.08);
  position: relative;
  box-shadow: 0 2px 6px rgba(11,35,65,0.05);
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.7;
}
.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0.65rem;
  top: 0.85rem;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
}
.steps-list li strong { color: var(--navy-dark); display: block; margin-bottom: 0.25rem; }

/* ── Tables ─────────────────────────────────────────────────── */
.ref-table-wrap,
.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border-radius: 11px;
  box-shadow: 0 3px 10px rgba(11,35,65,0.07);
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
  font-size: 0.8rem;
}
.ref-table th {
  background: var(--navy-dark);
  color: #fff;
  padding: 0.7rem 0.8rem;
  text-align: right;
  font-weight: 600;
  font-size: 0.72rem;
  white-space: nowrap;
}
.ref-table th:first-child { text-align: left; }
.ref-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(11,35,65,0.07);
  text-align: right;
  color: var(--muted);
}
.ref-table td:first-child { text-align: left; font-weight: 600; color: var(--navy-dark); }
.ref-table tr:nth-child(even) td { background: var(--frost); }
.ref-table tr:last-child td { border-bottom: none; }
.ref-table td:last-child { color: var(--blue); font-weight: 700; }
.ref-table .note-row td {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted-light);
  font-style: italic;
  background: #fff !important;
  padding: 0.5rem 0.8rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 380px;
  font-size: 0.83rem;
}
.compare-table th {
  background: var(--navy-dark);
  color: #fff;
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.76rem;
}
.compare-table th:nth-child(2),
.compare-table th:nth-child(3) { text-align: center; }
.compare-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid rgba(11,35,65,0.07);
  color: var(--muted);
  font-size: 0.83rem;
}
.compare-table td:nth-child(2),
.compare-table td:nth-child(3) { text-align: center; font-weight: 600; }
.compare-table td:nth-child(2) { color: var(--blue); }
.compare-table td:nth-child(3) { color: #27ae60; }
.compare-table tr:nth-child(even) td { background: var(--frost); }
.compare-table tr:last-child td { border-bottom: none; }

/* ── Myths ──────────────────────────────────────────────────── */
.myths-grid { display: grid; gap: 0.75rem; margin: 1.25rem 0; }
.myth-item {
  background: #fff;
  border-radius: 11px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(11,35,65,0.08);
  box-shadow: 0 2px 6px rgba(11,35,65,0.05);
}
.myth-label { font-size: 0.67rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.3rem; }
.myth-label.myth    { color: #c0392b; }
.myth-label.reality { color: #1a7a3f; }
.myth-text { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin: 0; }
.myth-text strong { color: var(--navy-dark); }

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-list { margin: 1rem 0; }
.faq-item { border-bottom: 1px solid rgba(11,35,65,0.08); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--navy-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 0;
  gap: 0.75rem;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; }
.faq-icon {
  width: 1.4rem;
  height: 1.4rem;
  min-width: 1.4rem;
  border-radius: 50%;
  background: var(--frost);
  border: 1px solid rgba(11,35,65,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--gold);
  font-weight: 700;
  transition: transform 0.2s;
  line-height: 1;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.92rem;
  padding-bottom: 0.85rem;
  margin: 0;
}

/* ── Article CTA ────────────────────────────────────────────── */
.article-cta {
  background: linear-gradient(135deg, rgba(26,63,111,0.97), rgba(11,35,65,1));
  border-radius: 16px;
  padding: 2rem 1.25rem;
  margin: 2.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-cta::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 50%; height: 150%;
  background: radial-gradient(circle, rgba(200,155,60,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.article-cta > * { position: relative; z-index: 1; }
.article-cta h2 {
  color: #fff !important;
  border-bottom: none !important;
  margin: 0 0 0.65rem !important;
  padding: 0 !important;
}
.article-cta > p {
  color: rgba(255,255,255,0.82);
  max-width: 520px;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
}
.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: stretch;
}
.cta-buttons .primary-button,
.cta-buttons .secondary-button { width: 100%; justify-content: center; }
.cta-buttons .secondary-button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}

/* ── Author box ─────────────────────────────────────────────── */
.author-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--frost);
  border-radius: 13px;
  padding: 1.1rem;
  margin: 2.5rem 0 1rem;
}
.author-box img {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(11,35,65,0.15);
}
.author-box-info h4 { margin: 0 0 0.25rem; font-size: 0.93rem; color: var(--navy-dark); }
.author-box-info p  { margin: 0; font-size: 0.83rem; color: var(--muted); line-height: 1.6; }
.author-box-info a  { color: var(--blue); }

/* ============================================================
   Responsive enhancements — progressively enhanced upward
   ============================================================ */

/* ── ≥480px: fire types go 2-col, small layout improvements ── */
@media (min-width: 480px) {
  .fire-types { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .article-outer { padding: 1.75rem 1.25rem 3.5rem; }
}

/* ── ≥600px: tablet-ish ──────────────────────────────────────── */
@media (min-width: 600px) {
  .article-outer { padding: 2rem 1.5rem 3.5rem; }
  .article-hero  { padding: 2.5rem 1.5rem 3rem; }
  .article-hero > .article-hero-inner > p { font-size: 1.02rem; }
  .cta-buttons {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.9rem;
  }
  .cta-buttons .primary-button,
  .cta-buttons .secondary-button { width: auto; }
  .author-box { flex-direction: row; align-items: flex-start; gap: 1rem; }
  .formula-box { padding: 1.35rem 1.6rem; font-size: 0.97rem; }
  .formula-main { font-size: 1.15rem; }
  .example-card { padding: 1.35rem; }
  .article-cta { padding: 2.25rem 1.75rem; }
}

/* ── ≥768px: tablet landscape / small desktop ────────────────── */
@media (min-width: 768px) {
  .article-outer  { padding: 2.25rem 1.75rem 4rem; }
  .article-hero   { padding: 2.75rem 1.75rem 3.25rem; }
  .article-hero h1 { font-size: clamp(1.9rem, 3.5vw, 3rem); }
  .article-hero > .article-hero-inner > p { font-size: 1.07rem; max-width: 640px; }
  .example-stats  { grid-template-columns: repeat(3, 1fr); }
  .formula-box    { padding: 1.5rem 2rem; font-size: 1rem; }
  .formula-main   { font-size: 1.25rem; }
  .steps-list li  {
    padding: 1rem 1.1rem 1rem 3.5rem;
    font-size: 0.96rem;
  }
  .steps-list li::before {
    left: 0.8rem; top: 0.95rem;
    width: 1.75rem; height: 1.75rem;
    font-size: 0.82rem;
  }
  .example-card   { padding: 1.6rem; }
  .article-cta    { padding: 2.5rem 2rem; }
  .author-box     { padding: 1.5rem; gap: 1.1rem; }
  .toc ol         { padding: 0.25rem 1.1rem 1rem 2.35rem; }
}

/* ── ≥900px: full desktop — two-column layout, sticky TOC ───── */
@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: start;
    gap: 2.5rem;
  }
  .toc { position: sticky; top: 6.5rem; }
  /* On desktop the TOC is always open — JS adds open attr,
     but also make summary non-interactive visually */
  .toc-title { cursor: default; }
  .toc-title::after { display: none; }
  .article-body h2 { scroll-margin-top: 7rem; }
  .fire-types { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.1rem; }
  .example-stats { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
  .formula-box { padding: 1.5rem 2rem; font-size: 1.05rem; }
  .formula-main { font-size: 1.3rem; }
  .steps-list li {
    padding: 1.1rem 1.1rem 1.1rem 4rem;
    font-size: 0.98rem;
  }
  .steps-list li::before {
    left: 1rem; top: 1rem;
    width: 1.85rem; height: 1.85rem;
    font-size: 0.85rem;
  }
  .article-hero  { padding: 3rem 2rem 3.5rem; }
  .article-outer { padding: 2.5rem 2rem 4rem; }
  .example-card  { padding: 1.75rem; }
}

/* ── ≥1100px: wider desktop ─────────────────────────────────── */
@media (min-width: 1100px) {
  .article-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .example-stats  { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
