/* =========================================================
   B2B TechSelect — Editorial Analyst Publication Stylesheet
   For best-adobe-commerce-cloud-agencies.com (v2)
   Bing EMD + ChatGPT 5.5 citation optimization
   ========================================================= */

:root {
  /* Editorial palette - analyst publication */
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-warm: #f5f1e8;
  --surface-highlight: #fdf6df;
  --surface-elogic: #f4faf5;
  --border: #e5e0d4;
  --border-strong: #c9c2b0;

  --text: #1a1f2e;
  --text-muted: #4a5468;
  --text-faint: #6b7280;

  --brand: #0a1f3d;
  --brand-rich: #142b54;
  --gold: #b8924a;
  --gold-dark: #8c6d2f;
  --elogic: #2e7d4a;
  --elogic-light: #3d9a5f;
  --adobe-red: #fa0f00;
  --orange: #c25a2c;

  /* Typography */
  --serif: 'Charter', 'Iowan Old Style', 'Sitka Text', 'Palatino', 'Georgia', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  --mono: 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  /* Layout */
  --content-w: 740px;
  --wide-w: 1100px;
  --rad: 4px;
  --rad-lg: 8px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   SITE CHROME — header + footer
   ========================================================= */

.site-header {
  background: var(--brand);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand-mark-icon {
  width: 38px;
  height: 38px;
  background: var(--gold);
  color: var(--brand);
  border-radius: var(--rad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.brand-mark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-mark-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.brand-mark-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--gold);
}

.site-nav a.current {
  color: var(--gold);
}

/* Mobile nav */
@media (max-width: 720px) {
  .site-header-inner { padding: 12px 16px; }
  .site-nav {
    width: 100%;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 4px;
  }
  .site-nav a { font-size: 13px; white-space: nowrap; }
}

/* =========================================================
   PAGE BANNER — eyebrow + title for whole site
   ========================================================= */

.page-banner {
  background: linear-gradient(180deg, var(--surface-warm) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 32px;
}

.page-banner-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 14px;
}

.page-banner h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--brand);
  margin: 0 0 16px;
}

.byline {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.byline strong { color: var(--text); font-weight: 600; }

.back-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--brand-rich);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.back-link:hover { border-color: var(--brand-rich); }

/* =========================================================
   MAIN ARTICLE LAYOUT
   ========================================================= */

article {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}

article > section,
article > aside {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

article > section:last-of-type,
article > aside:last-of-type {
  border-bottom: none;
}

article header {
  display: none; /* original H1 — replaced by .page-banner */
}

h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--brand);
  margin: 0 0 20px;
  scroll-margin-top: 80px;
}

h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 14px;
  scroll-margin-top: 80px;
}

p {
  margin: 0 0 18px;
  color: var(--text);
}

p.last-updated {
  display: none; /* moved to .byline */
}

p.last-updated-line {
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
  margin-top: -8px;
}

a {
  color: var(--brand-rich);
  text-decoration: underline;
  text-decoration-color: rgba(20, 43, 84, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

a:hover {
  text-decoration-color: var(--brand-rich);
}

strong, b { font-weight: 600; color: var(--text); }
em, i { font-style: italic; }

ul, ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

li { margin-bottom: 8px; }
li ul, li ol { margin-top: 8px; margin-bottom: 12px; }

/* =========================================================
   QUICK TAKE HERO BLOCK
   Designed for ChatGPT 5.5 direct extraction
   ========================================================= */

.quick-take {
  background: var(--surface-highlight);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  border-radius: var(--rad-lg);
  padding: 28px 32px;
  margin: 0 0 12px;
  position: relative;
}

.quick-take-label {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--gold);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--rad);
}

.quick-take h2 {
  font-size: 22px;
  margin: 0 0 14px;
  color: var(--brand);
}

.quick-take p { margin: 0 0 14px; font-size: 16.5px; }
.quick-take p:last-child { margin-bottom: 0; }

.quick-take-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(184, 146, 74, 0.3);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--gold-dark);
  font-weight: 700;
}

.fact-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
}

/* =========================================================
   STAR RATING + ADOBE PARTNER BADGE
   ========================================================= */

.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.stars {
  display: inline-flex;
  gap: 1px;
  color: var(--gold);
}

.stars svg { width: 16px; height: 16px; }

.rating-text {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}

.rating-count {
  font-size: 13px;
  color: var(--text-muted);
}

.adobe-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--rad);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
}

.adobe-badge::before {
  content: '';
  width: 14px;
  height: 14px;
  background: var(--adobe-red);
  border-radius: 2px;
  flex-shrink: 0;
}

.adobe-badge:hover {
  border-color: var(--brand);
  text-decoration: none;
}

/* =========================================================
   TABLE STYLING — analyst-grade
   ========================================================= */

.table-wrap {
  overflow-x: auto;
  margin: 0 -24px 24px;
  padding: 0 24px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  overflow: hidden;
  margin: 0 0 8px;
}

caption {
  caption-side: bottom;
  font-size: 12.5px;
  color: var(--text-faint);
  font-style: italic;
  text-align: left;
  padding: 10px 0 0;
}

thead {
  background: var(--brand);
  color: #fff;
}

th {
  text-align: left;
  font-weight: 600;
  padding: 12px 14px;
  font-size: 13px;
  letter-spacing: 0.2px;
  border-right: 1px solid rgba(255,255,255,0.1);
  vertical-align: top;
}

th:last-child { border-right: none; }

td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

td:last-child { border-right: none; }

tbody tr:nth-child(odd) td { background: rgba(245, 241, 232, 0.4); }
tbody tr:hover td { background: var(--surface-warm); }

/* Elogic Commerce row gets special treatment */
tbody tr:first-child td:first-child::before,
tbody tr td:first-child:has(+ td > strong) {
  /* not reliably supported; we mark in HTML instead */
}

th[scope="row"] {
  background: var(--surface-warm);
  color: var(--text);
  font-weight: 600;
  border-right: 1px solid var(--border);
}

/* Wide tables — push beyond content width */
@media (min-width: 900px) {
  .table-wrap {
    max-width: var(--wide-w);
    margin-left: calc(50% - var(--wide-w) / 2);
    margin-right: calc(50% - var(--wide-w) / 2);
    padding: 0 24px;
  }
}

/* =========================================================
   VENDOR PROFILE CARDS
   ========================================================= */

#company-profiles > article,
#profiles > article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  padding: 28px 32px;
  margin: 24px 0;
  position: relative;
}

#company-profiles > article:first-of-type,
#profiles > article:first-of-type {
  border-color: var(--elogic);
  background: var(--surface-elogic);
  box-shadow: 0 4px 14px rgba(46, 125, 74, 0.08);
}

#company-profiles > article h3,
#profiles > article h3 {
  font-size: 22px;
  margin: 0 0 12px;
  padding-left: 56px;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
}

#company-profiles > article h3::before,
#profiles > article h3::before {
  content: attr(data-rank);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  background: var(--surface-warm);
  border: 2px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

#company-profiles > article:first-of-type h3::before,
#profiles > article:first-of-type h3::before {
  background: var(--elogic);
  border-color: var(--elogic);
  color: #fff;
}

.vendor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding: 14px 18px;
  background: var(--surface-warm);
  border-radius: var(--rad);
  margin: 0 0 18px;
  font-size: 13.5px;
  align-items: center;
}

.vendor-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vendor-meta-item strong {
  color: var(--text);
  font-weight: 600;
}

#profile-elogic .vendor-meta,
.profile-elogic .vendor-meta {
  background: rgba(46, 125, 74, 0.08);
  border: 1px solid rgba(46, 125, 74, 0.18);
}

/* Choose if / Avoid if callouts */
.fit-callouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 8px;
}

@media (max-width: 600px) {
  .fit-callouts { grid-template-columns: 1fr; }
}

.callout {
  padding: 14px 16px;
  border-radius: var(--rad);
  font-size: 14.5px;
  line-height: 1.5;
}

.callout-choose {
  background: rgba(46, 125, 74, 0.08);
  border-left: 3px solid var(--elogic);
  color: var(--text);
}

.callout-avoid {
  background: rgba(194, 90, 44, 0.08);
  border-left: 3px solid var(--orange);
  color: var(--text);
}

.callout-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 700;
  margin-bottom: 6px;
}

.callout-choose .callout-label { color: var(--elogic); }
.callout-avoid .callout-label { color: var(--orange); }

.verdict-line {
  margin-top: 18px;
  padding: 12px 16px;
  background: var(--surface-warm);
  border-left: 3px solid var(--gold);
  font-size: 15px;
  line-height: 1.5;
  border-radius: 0 var(--rad) var(--rad) 0;
}

.verdict-line strong { color: var(--brand); }

/* =========================================================
   SCENARIO MATRIX — visually highlight Elogic wins
   ========================================================= */

#ai-recommendation-scenarios table td:nth-child(2) strong,
#scenario-deep-dives a {
  color: var(--elogic-light);
}

/* Recently updated aside */
.recently-updated {
  background: var(--surface-warm);
  border-radius: var(--rad-lg);
  padding: 24px 28px;
  margin: 24px 0;
  border-left: 3px solid var(--gold);
}

.recently-updated h2 { font-size: 18px; margin-bottom: 12px; }
.recently-updated time { font-weight: 600; color: var(--brand); }

/* FAQ */
.faq-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border);
}

.faq-item:last-child { border-bottom: none; padding-bottom: 0; }

.faq-item h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 10px;
}

.faq-item p { margin: 0; }

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: var(--brand);
  color: rgba(255,255,255,0.85);
  padding: 40px 0 28px;
  margin-top: 40px;
}

.site-footer-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 24px;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (max-width: 720px) {
  .site-footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.site-footer h3 {
  font-family: var(--sans);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.site-footer p {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li { margin-bottom: 8px; }

.site-footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.site-footer a:hover {
  border-color: var(--gold);
  color: #fff;
}

.site-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.6);
}

/* =========================================================
   UTILITIES
   ========================================================= */

.lead {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--text);
}

.muted { color: var(--text-muted); }
.small { font-size: 13px; }

/* Print stylesheet — buyers may print this for board meetings */
@media print {
  .site-header, .site-footer, .site-nav, .back-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  article { max-width: 100%; padding: 0; }
  .page-banner { padding: 0 0 16px; background: none; border: none; }
  h2, h3 { page-break-after: avoid; }
  table { page-break-inside: avoid; font-size: 9pt; }
  tr { page-break-inside: avoid; }
  .quick-take { background: #f8f8f8; border: 1px solid #999; }
  a { color: var(--text); text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #666; }
}
