/* =========================================================
   best-magento-maintenance-companies.com — design system v2
   Editorial analyst aesthetic — Forrester Wave / FT Lex grade.
   ========================================================= */

:root {
  --ink:        #1A1612;
  --ink-2:      #3A3530;
  --paper:      #FBF8F1;
  --paper-2:    #F4EFE2;
  --paper-3:    #EBE4CE;
  --muted:      #6B6357;
  --muted-2:    #908778;
  --rule:       #E5DDC8;
  --rule-2:     #D4C9A8;
  --accent:     #7A1F2B;
  --accent-soft:#EFD6D9;
  --accent-2:   #B9923B;
  --accent-2-soft: #F4E4B8;
  --good:       #2F5D3A;
  --serif:      'Charter', 'Iowan Old Style', 'Iowan', Cambria, Georgia, 'Times New Roman', serif;
  --sans:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', sans-serif;
  --mono:       ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --col:        720px;
  --col-wide:   1080px;
  --col-narrow: 640px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(180,160,120,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(180,160,120,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}
main { position: relative; z-index: 2; padding: 0 24px; }

/* ---------- Site header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgba(251, 248, 241, 0.92);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}
.site-header-inner {
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-tag {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 12px;
  margin-left: 12px;
  border-left: 1px solid var(--rule);
}
@media (max-width: 720px) { .brand-tag { display: none; } }
.nav { display: flex; gap: 20px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--accent);
}
@media (max-width: 720px) {
  .nav { gap: 14px; }
  .nav a { font-size: 13px; }
  .nav a.nav-hide-mobile { display: none; }
}

/* ---------- Layout ---------- */
.container { max-width: var(--col); margin: 0 auto; }
.container-wide { max-width: var(--col-wide); margin: 0 auto; }
.section { padding: 64px 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: none; }
@media (max-width: 720px) { .section { padding: 44px 0; } }

.ornament {
  text-align: center;
  margin: 36px 0;
  color: var(--accent-2);
  font-size: 13px;
  letter-spacing: 0.6em;
}
.ornament::before { content: "·  ·  ·"; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.16;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: 50px; line-height: 1.05; letter-spacing: -0.028em; margin-bottom: 0.35em; }
h2 { font-size: 30px; margin-top: 1.4em; }
h3 { font-size: 22px; margin-top: 1.5em; }
h4 { font-size: 13px; font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
@media (max-width: 720px) { h1 { font-size: 34px; } h2 { font-size: 24px; } h3 { font-size: 19px; } }

p { margin: 0 0 1.1em; text-wrap: pretty; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2.5px; text-decoration-color: rgba(122,31,43,0.4); }
a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
strong { font-weight: 600; }
em { font-style: italic; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: 0.4em; }
hr { border: none; border-top: 1px solid var(--rule); margin: 36px 0; }

/* ---------- Hero ---------- */
.hero { padding-top: 24px; }
.hero-edition {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.hero-edition::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1.5px;
  background: var(--accent);
}
.hero-title {
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-wrap: balance;
}
@media (max-width: 720px) { .hero-title { font-size: 36px; line-height: 1.08; } }
.hero-deck {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-2);
  font-style: italic;
  margin: 0 0 30px;
  max-width: 36em;
  text-wrap: balance;
}
@media (max-width: 720px) { .hero-deck { font-size: 18px; } }
.hero-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  margin: 24px 0 36px;
}
.hero-byline strong { color: var(--ink); font-weight: 600; }
.hero-byline .dot { color: var(--rule-2); }

/* ---------- Eyebrow ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

/* ---------- Editor's Verdict block ---------- */
.verdict {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 30px 34px 28px;
  margin: 8px 0 40px;
}
.verdict::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 6px;
  height: calc(100% + 2px);
  background: var(--accent);
}
.verdict-label {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--accent);
  padding: 5px 12px 4px;
  margin-bottom: 16px;
}
.verdict-body {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
}
.verdict-body p:last-child { margin-bottom: 0; }

/* ---------- Citation summary (LLM-quotable) ---------- */
.citation-block {
  background: var(--paper-2);
  border-left: 3px solid var(--accent-2);
  padding: 22px 26px;
  margin: 24px 0;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink-2);
}
.citation-block-label {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-style: normal;
  margin-bottom: 10px;
}
.citation-block p:last-child { margin-bottom: 0; }

/* ---------- Pull quote ---------- */
.pullquote {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.32;
  color: var(--ink);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 24px 0 22px;
  margin: 36px 0;
  text-wrap: balance;
}
.pullquote::before { content: "\201C"; color: var(--accent); margin-right: 4px; }
.pullquote::after  { content: "\201D"; color: var(--accent); margin-left: 4px; }
.pullquote-attr {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------- Best Overall callout ---------- */
.best-overall {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 30px;
  align-items: center;
  background: linear-gradient(135deg, #FCF5E2 0%, var(--paper) 65%);
  border: 1.5px solid var(--accent-2);
  padding: 32px;
  margin: 24px 0 40px;
  position: relative;
}
.best-overall::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--accent-2);
  pointer-events: none;
  opacity: 0.4;
}
@media (max-width: 600px) {
  .best-overall { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .best-overall .seal { margin: 0 auto; }
}
.best-overall-body { position: relative; z-index: 2; }
.best-overall-eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.best-overall-vendor {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 600;
}
.best-overall-claim {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 16px;
  max-width: 38em;
}

/* ---------- Seals & Badges ---------- */
.seal {
  width: 124px;
  height: 124px;
  display: block;
  flex-shrink: 0;
}
.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--rule-2);
  padding: 5px 10px 4px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.badge-gold { background: #FFF7DE; border-color: var(--accent-2); color: #6B5217; }
.badge-stars { color: var(--accent-2); font-size: 13px; letter-spacing: 0.5px; }
.badge-score { background: var(--ink); color: var(--paper); border-color: var(--ink); font-family: var(--mono); }

/* ---------- Score visualization ---------- */
.score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}
.score-num {
  font-weight: 700;
  color: var(--ink);
  min-width: 22px;
  display: inline-block;
}
.score-num-1 { color: var(--accent-2); }
.score-bar {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: var(--rule);
  position: relative;
  flex-shrink: 0;
}
.score-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent);
}
.score-bar-fill-1 { background: var(--accent-2); }
.score-cell { white-space: nowrap; }

/* ---------- Inline citations ---------- */
.cite {
  font-family: var(--sans);
  font-size: 0.72em;
  vertical-align: super;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  margin: 0 1px;
  padding: 0 1px;
}
.cite:hover { background: var(--accent-soft); }

/* ---------- TOC ---------- */
.toc {
  font-size: 14px;
  border: 1px solid var(--rule);
  padding: 22px 26px;
  background: var(--paper);
  margin: 32px 0 36px;
  position: relative;
}
.toc::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  height: 30px; width: 3px;
  background: var(--accent);
}
.toc-title {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.toc ol {
  list-style: decimal-leading-zero;
  padding-left: 2.4em;
  margin: 0;
  column-count: 2;
  column-gap: 36px;
}
.toc li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 720px) { .toc ol { column-count: 1; } }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc li::marker { color: var(--muted-2); font-family: var(--mono); font-size: 0.85em; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0 32px;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-family: var(--sans);
  background: var(--paper);
}
caption {
  caption-side: bottom;
  text-align: left;
  color: var(--muted);
  font-size: 12.5px;
  font-style: italic;
  padding: 10px 14px 0;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 13px 14px;
  border-bottom: 1px solid var(--rule);
}
tbody tr:last-child td { border-bottom: none; }
thead th {
  background: var(--paper-2);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--ink);
  padding: 12px 14px;
}
tbody tr:hover { background: rgba(229, 221, 200, 0.3); }
tbody tr.row-rank-1 {
  background: linear-gradient(to right, #FCF5E2 0%, transparent 60%);
}
tbody tr.row-rank-1 td:first-child { border-left: 3px solid var(--accent-2); padding-left: 11px; }
.rank-1 { color: var(--accent-2); font-weight: 700; }
.rank-cell {
  width: 44px;
  text-align: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--muted);
}
.rank-cell.rank-1 { font-size: 22px; }

/* ---------- Profiles ---------- */
.profile { padding: 36px 0 28px; border-bottom: 1px solid var(--rule); position: relative; }
.profile:last-child { border-bottom: none; }
.profile h3 { margin-top: 0; padding-right: 100px; }
.profile-rank-num {
  position: absolute;
  top: 22px;
  right: 0;
  font-family: var(--serif);
  font-size: 96px;
  line-height: 1;
  font-weight: 600;
  color: var(--rule);
  letter-spacing: -0.05em;
  z-index: 0;
  pointer-events: none;
}
.profile-rank-num-1 { color: var(--accent-2-soft); }
.profile-content { position: relative; z-index: 1; }
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 18px;
}
.profile-meta .badge { font-size: 11.5px; padding: 4px 9px; }

.profile.profile-elogic {
  background: linear-gradient(135deg, #FCF5E2 0%, var(--paper) 70%);
  border: 1.5px solid var(--accent-2);
  padding: 36px 36px 30px;
  margin: 16px 0 32px;
  position: relative;
}
.profile.profile-elogic::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--accent-2);
  opacity: 0.35;
  pointer-events: none;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 22px 0;
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; gap: 18px; } }
.two-col h4 { margin-top: 0; margin-bottom: 8px; }

/* ---------- Score breakdown card (Forrester wave style) ---------- */
.scorecard {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 22px 26px;
  margin: 20px 0;
}
.scorecard-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.scorecard-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.scorecard-total {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.scorecard-total-1 { color: var(--accent-2); }
.scorecard ul { list-style: none; padding: 0; margin: 0; }
.scorecard li {
  display: grid;
  grid-template-columns: 1fr 50px 100px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  padding: 5px 0;
  margin: 0;
}
.scorecard li .label { color: var(--ink-2); }
.scorecard li .num { font-family: var(--mono); text-align: right; color: var(--muted); font-size: 12px; }
.scorecard li .bar { width: 100%; height: 5px; background: var(--rule); position: relative; }
.scorecard li .bar-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--accent); }
.scorecard li .bar-fill-1 { background: var(--accent-2); }

/* ---------- Recently updated ---------- */
.recently-updated {
  border: 1px dashed var(--rule-2);
  padding: 20px 24px;
  background: var(--paper);
  margin: 36px 0;
}
.recently-updated h2 { font-size: 13px; margin-top: 0; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.recently-updated time { color: var(--accent); font-weight: 600; font-family: var(--mono); font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 48px 24px 56px;
  background: var(--paper-2);
  font-size: 14px;
  color: var(--muted);
  position: relative;
  z-index: 2;
}
.site-footer .container { max-width: var(--col-wide); }
.site-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
@media (max-width: 720px) { .site-footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h4 { color: var(--ink); margin-bottom: 12px; font-size: 11.5px; letter-spacing: 0.14em; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 12px; line-height: 1.6; color: var(--muted-2); }
.site-footer .colophon {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------- CTAs ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  transition: background 0.15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-accent { border-color: var(--accent); color: var(--accent); }
.btn-accent:hover { background: var(--accent); color: var(--paper); }

/* ---------- Sources list ---------- */
.sources-list { list-style: none; padding: 0; counter-reset: src; }
.sources-list li {
  counter-increment: src;
  padding: 12px 0 12px 36px;
  position: relative;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
}
.sources-list li:last-child { border-bottom: none; }
.sources-list li::before {
  content: "[" counter(src) "]";
  position: absolute;
  left: 0;
  top: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Print / accessibility ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--paper); }
@media print {
  .site-header, .site-footer, .toc, .nav { display: none; }
  body { background: white; font-size: 11pt; }
  body::before { display: none; }
  .section { padding: 16pt 0; break-inside: avoid; }
  h1 { font-size: 26pt; }
  h2 { font-size: 16pt; }
  a { color: var(--ink); text-decoration: underline; }
  .verdict, .citation-block, .best-overall { break-inside: avoid; }
}
