﻿/* ═══════════════════════════════════════════════════════════
   INNOMERC TECH, ARTICLE / INSIGHT DETAIL PAGE STYLES
   Used by: insights/*.html article pages
   Supplements: style.css + pages.css
   Variables: uses style.css tokens (--text, --surface-2, etc.)
   ═══════════════════════════════════════════════════════════ */

/* ── ARTICLE LAYOUT ─────────────────────────────────────── */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

/* ── ARTICLE BODY ────────────────────────────────────────── */
.article-body { max-width: 72ch; }

/* Override pages.css h2/h3 to use article-specific sizing */
.article-body h2 {
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 .75rem;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal);
  margin: 2rem 0 .5rem;
}
.article-body p {
  font-size: .97rem;
  line-height: 1.8;
  color: var(--text-2);
  margin-bottom: 1rem;
}
.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-body li {
  font-size: .97rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: .4rem;
}
.article-body strong { color: var(--text); }
.article-body a { color: var(--teal); transition: opacity .2s; }
.article-body a:hover { opacity: .8; }

.article-lead-visual{display:flex;align-items:center;gap:1rem;padding:1.2rem 1.35rem;margin:0 0 2rem;border:1px solid rgba(48,213,200,.18);border-radius:15px;background:linear-gradient(135deg,rgba(48,213,200,.08),rgba(114,169,255,.035)),var(--surface)}
.article-lead-visual>i{display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;border-radius:13px;background:var(--teal-dim);color:var(--teal);font-size:1.2rem}.article-lead-visual div{display:grid;gap:.25rem}.article-lead-visual strong{font-family:var(--font-d);font-size:.94rem}.article-lead-visual span{font-size:.75rem;color:var(--text-3)}
.article-lead-visual.visual-blue{border-color:rgba(114,169,255,.2);background:linear-gradient(135deg,var(--blue-dim),rgba(48,213,200,.035)),var(--surface)}.article-lead-visual.visual-blue>i{background:var(--blue-dim);color:var(--blue)}
.article-lead-visual.visual-orange{border-color:rgba(255,159,28,.2);background:linear-gradient(135deg,var(--orange-dim),rgba(114,169,255,.025)),var(--surface)}.article-lead-visual.visual-orange>i{background:var(--orange-dim);color:var(--orange)}
.compare-table-wrap{max-width:100%;overflow-x:auto;margin:1.5rem 0}.compare-table-wrap .compare-table{margin:0;min-width:620px}.source-card{margin-top:1.5rem}

/* Compact service map at the end of every article */
.article-service-map{margin-top:3.4rem;padding:1.5rem;border:1px solid rgba(48,213,200,.17);border-radius:18px;background:linear-gradient(135deg,rgba(48,213,200,.06),rgba(114,169,255,.025)),var(--surface);box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.article-service-map .article-service-kicker{display:block;margin-bottom:.6rem;font:700 .62rem/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.13em;text-transform:uppercase;color:var(--teal)}
.article-service-map h2{margin:0 0 .45rem;font-size:1.15rem}.article-service-map p{margin:0 0 1.1rem;font-size:.82rem;color:var(--text-3)}
.article-service-links{display:flex;flex-wrap:wrap;gap:.48rem}.article-service-links a{display:inline-flex;align-items:center;min-height:34px;padding:.45rem .68rem;border:1px solid var(--border-2);border-radius:9px;background:rgba(255,255,255,.022);font-size:.72rem;font-weight:650;color:var(--text-2);transition:transform .2s,border-color .2s,color .2s,background .2s}.article-service-links a:hover{opacity:1;transform:translateY(-1px);border-color:rgba(48,213,200,.35);background:var(--teal-dim);color:var(--teal)}
[data-theme="light"] .article-service-map{background:linear-gradient(135deg,rgba(15,159,149,.055),rgba(53,111,195,.025)),#fff;box-shadow:0 12px 34px rgba(15,23,42,.05)}
@media(max-width:560px){.article-lead-visual{align-items:flex-start;padding:1rem}.article-lead-visual>i{width:40px;height:40px;flex-basis:40px}}

/* blockquote, uses pages.css style but override for article spacing */
.article-body blockquote {
  border-left: 3px solid var(--teal);
  padding: .85rem 1.25rem;
  background: var(--teal-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.75rem 0;
  font-style: italic;
  color: var(--text-2);
}

/* ── CALLOUT / WARNING BOX ───────────────────────────────── */
.article-body .callout {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}
.article-body .callout strong { color: var(--orange); }

/* ── ARTICLE META BAR ────────────────────────────────────── */
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  font-size: .82rem;
  color: var(--text-3);
}
.article-meta-tag,
.article-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-dim);
  padding: .25rem .65rem;
  border-radius: 99px;
}

/* ── SIDEBAR CARD ────────────────────────────────────────── */
.sidebar-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h4 {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  margin-bottom: 1rem;
}

/* ── TABLE OF CONTENTS (sidebar) ─────────────────────────── */
.sidebar-toc a {
  display: block;
  font-size: .83rem;
  color: var(--text-2);
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
  line-height: 1.4;
}
.sidebar-toc a:hover { color: var(--teal); }
.sidebar-toc a:last-child { border-bottom: none; }

/* ── ARTICLE CTA CARD ────────────────────────────────────── */
.article-cta {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}
.article-cta h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}
.article-cta p {
  font-size: .85rem;
  color: var(--text-2);
  margin-bottom: 1.25rem;
}
.article-cta .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 0;
}

/* ── RELATED ARTICLES (sidebar) ──────────────────────────── */
.related-articles a {
  display: block;
  font-size: .83rem;
  color: var(--text-2);
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
  line-height: 1.45;
}
.related-articles a:hover { color: var(--teal); }
.related-articles a:last-child { border-bottom: none; }

/* ── ARTICLE FAQ ─────────────────────────────────────────── */
.article-faq { margin-top: 2.5rem; }

/* Scoped faq-icon overrides for article pages:
   pages.css draws a circle with ::before/::after lines.
   Article FAQs instead show a "+" character that rotates to ×.
   We reset the circle and hide the pseudo-element lines here. */
.article-faq .faq-item {
  border-left: 3px solid transparent;
}
.article-faq .faq-item.active {
  border-left-color: var(--teal);
}
.article-faq .faq-icon {
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  background: none !important;
  font-size: 1.2rem;
  font-style: normal;
  transition: transform .25s;
  flex-shrink: 0;
  margin-left: .5rem;
}
.article-faq .faq-icon::before,
.article-faq .faq-icon::after { display: none; }
.article-faq .faq-item.active .faq-icon { transform: rotate(45deg); }
.article-faq .faq-q { color: var(--text); }
.article-faq .faq-q:hover { color: var(--teal); }

/* Native, accessible FAQ and table patterns used by current articles */
.article-faq details{margin-top:.7rem;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);overflow:hidden}
.article-faq summary{position:relative;display:block;padding:1rem 3rem 1rem 1.1rem;cursor:pointer;font-weight:650;color:var(--text);list-style:none}
.article-faq summary::-webkit-details-marker{display:none}
.article-faq summary::after{content:'+';position:absolute;right:1.15rem;top:50%;transform:translateY(-50%);font-size:1.25rem;font-weight:400;color:var(--teal);transition:transform .2s}
.article-faq details[open]{border-color:rgba(48,213,200,.25)}
.article-faq details[open] summary::after{transform:translateY(-50%) rotate(45deg)}
.article-faq details p{margin:0;padding:0 1.1rem 1rem;color:var(--text-2)}
.article-table-wrap{max-width:100%;overflow-x:auto;margin:1.5rem 0;border-radius:12px}
.article-table{width:100%;min-width:640px;border-collapse:collapse;font-size:.86rem}
.article-table th{padding:.76rem .9rem;border:1px solid var(--border);background:var(--teal-dim);color:var(--teal);font-weight:700;text-align:left}
.article-table td{padding:.74rem .9rem;border:1px solid var(--border);color:var(--text-2);line-height:1.55;vertical-align:top}
.article-table tr:nth-child(even) td{background:var(--surface-3)}
.article-callout{margin:1.75rem 0;padding:1.1rem 1.25rem;border:1px solid var(--border);border-left:3px solid var(--orange);border-radius:0 12px 12px 0;background:var(--surface-2)}
.article-callout>strong{display:block;margin-bottom:.35rem;color:var(--orange)}
.article-callout p{margin:0}
[data-theme="light"] .article-faq details,[data-theme="light"] .article-callout{background:#fff}
[data-theme="light"] .article-table tr:nth-child(even) td{background:rgba(15,23,42,.025)}

/* ── COMPARISON TABLE ────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .88rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.compare-table th {
  padding: .7rem 1rem;
  background: var(--teal-dim);
  color: var(--teal);
  font-weight: 600;
  text-align: left;
  border: 1px solid var(--border);
  letter-spacing: .02em;
}
.compare-table td {
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.55;
}
.compare-table tr:nth-child(even) td { background: var(--surface-3); }

[data-theme="light"] .compare-table th {
  background: rgba(13,148,136,.07);
  color: var(--teal);
}
[data-theme="light"] .compare-table tr:nth-child(even) td {
  background: rgba(15,23,42,.025);
}

/* ── TRAINING MODULES GRID ───────────────────────────────── */
.training-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.training-module {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  transition: border-color .2s;
}
.training-module:hover { border-color: rgba(44,188,182,.2); }
.training-module strong {
  display: block;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .35rem;
}
.training-module span {
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* ── RED FLAG LIST ────────────────────────────────────────── */
.red-flag-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.red-flag-list li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem 1.1rem;
  background: rgba(242,145,0,.05);
  border: 1px solid rgba(242,145,0,.18);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  color: var(--text-2);
  line-height: 1.55;
}
.red-flag-list li::before {
  content: '⚠';
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: .05rem;
  line-height: 1.4;
}

/* ── EVALUATION CHECKLIST ────────────────────────────────── */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
  color: var(--text-2);
  line-height: 1.55;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .05rem;
}

/* ── LIGHT THEME OVERRIDES ───────────────────────────────── */
[data-theme="light"] .sidebar-card {
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(15,23,42,.05);
}
[data-theme="light"] .article-cta {
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(15,23,42,.05);
}
[data-theme="light"] .article-body .callout {
  background: rgba(234,88,12,.04);
  border-color: rgba(234,88,12,.18);
}
[data-theme="light"] .training-module {
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(15,23,42,.04);
}
[data-theme="light"] .red-flag-list li {
  background: rgba(234,88,12,.04);
  border-color: rgba(234,88,12,.15);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-wrap {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
}
@media (max-width: 600px) {
  .training-modules {
    grid-template-columns: 1fr;
  }
}
