:root {
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --tier-1: #6366f1;
  --tier-2: #06b6d4;
  --tier-3: #8b5cf6;
  --tier-4: #f59e0b;
  --tier-5: #ef4444;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-soft: #4b5563;
  --text-mute: #9ca3af;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --bg-card: #1e293b;
    --border: #334155;
    --border-strong: #475569;
    --text: #f1f5f9;
    --text-soft: #cbd5e1;
    --text-mute: #94a3b8;
    --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.4);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top nav */
.topnav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}

.back-link {
  font-size: 13px;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.back-link:hover { color: var(--primary-light); }

/* Main */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

main.detail { max-width: 880px; }

/* Hero */
.hero {
  text-align: center;
  padding: 16px 0 32px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text);
}

.hero .lead {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .hero h1 { font-size: 32px; }
  .hero .lead { font-size: 18px; }
}

/* ============================================
   INDEX comparison table (NO HORIZONTAL SCROLL)
   ============================================ */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.compare-table th, .compare-table td {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  word-wrap: break-word;
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  padding-left: 8px;
  font-weight: 600;
  color: var(--text-soft);
  font-size: 11px;
  width: 22%;
  background: var(--bg-soft);
}

.compare-table th {
  background: var(--bg-soft);
  font-weight: 700;
  padding: 12px 4px;
  border-bottom: 2px solid var(--border-strong);
}

.compare-table .tier-head {
  width: 15.6%;
}

@media (min-width: 480px) {
  .compare-table { font-size: 12px; }
  .compare-table th, .compare-table td { padding: 10px 6px; }
}

@media (min-width: 640px) {
  .compare-table { font-size: 13px; }
  .compare-table th, .compare-table td { padding: 12px 8px; }
  .compare-table th:first-child,
  .compare-table td:first-child { font-size: 13px; padding-left: 12px; }
}

@media (min-width: 800px) {
  .compare-table { font-size: 14px; }
  .compare-table th, .compare-table td { padding: 14px 10px; }
}

.tier-pill {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  color: white;
  font-weight: 800;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .tier-pill { font-size: 10px; padding: 3px 8px; }
}

@media (min-width: 640px) {
  .tier-pill { font-size: 11px; padding: 4px 10px; border-radius: 6px; }
}

.tier-pill.t1 { background: var(--tier-1); }
.tier-pill.t2 { background: var(--tier-2); }
.tier-pill.t3 { background: var(--tier-3); }
.tier-pill.t4 { background: var(--tier-4); }
.tier-pill.t5 { background: var(--tier-5); }

.compare-table tr.row-price td {
  background: var(--bg-soft);
  font-weight: 800;
  font-size: 13px;
  color: var(--primary-light);
  padding-top: 10px;
  padding-bottom: 10px;
}

@media (min-width: 640px) {
  .compare-table tr.row-price td { font-size: 16px; }
}

.compare-table tr.row-savings td {
  background: rgba(16,185,129,0.06);
  font-weight: 700;
  color: var(--accent-green);
}

.compare-table tr.row-link td {
  padding: 10px 4px;
  border-bottom: none;
}

@media (min-width: 640px) {
  .compare-table tr.row-link td { padding: 14px 8px; }
}

.tier-cta {
  display: inline-block;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--primary);
  color: white !important;
  font-weight: 700;
  font-size: 10px;
  text-decoration: none !important;
  width: 100%;
  text-align: center;
}

@media (min-width: 480px) {
  .tier-cta { font-size: 11px; padding: 7px 10px; }
}

@media (min-width: 640px) {
  .tier-cta { font-size: 13px; padding: 9px 14px; }
}

.tier-cta.t1 { background: var(--tier-1); }
.tier-cta.t2 { background: var(--tier-2); }
.tier-cta.t3 { background: var(--tier-3); }
.tier-cta.t4 { background: var(--tier-4); }
.tier-cta.t5 { background: var(--tier-5); }

.tier-cta:hover { opacity: 0.92; text-decoration: none; }

/* Below-table notes */
.notes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .notes-grid { grid-template-columns: repeat(3, 1fr); }
}

.note-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.note-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.note-card-body {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}

/* Methodology link */
.methodology {
  text-align: center;
  margin: 40px 0 0;
  font-size: 13px;
  color: var(--text-mute);
}

.methodology a { color: var(--primary-light); }

/* ============================================
   DETAIL pages
   ============================================ */
.tier-header {
  text-align: center;
  padding: 16px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.tier-header .tier-pill-lg {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.tier-header .tier-pill-lg.t1 { background: var(--tier-1); }
.tier-header .tier-pill-lg.t2 { background: var(--tier-2); }
.tier-header .tier-pill-lg.t3 { background: var(--tier-3); }
.tier-header .tier-pill-lg.t4 { background: var(--tier-4); }
.tier-header .tier-pill-lg.t5 { background: var(--tier-5); }

.tier-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.tier-header .price-big {
  font-size: 42px;
  font-weight: 800;
  color: var(--tier-color);
  line-height: 1;
  margin: 12px 0;
}

.tier-header .profile {
  font-size: 15px;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto;
}

.tier-header .profile strong { color: var(--text); font-weight: 600; }

.detail.tier1 { --tier-color: var(--tier-1); }
.detail.tier2 { --tier-color: var(--tier-2); }
.detail.tier3 { --tier-color: var(--tier-3); }
.detail.tier4 { --tier-color: var(--tier-4); }
.detail.tier5 { --tier-color: var(--tier-5); }

/* Section headings */
section { margin-bottom: 40px; }

h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.25;
  color: var(--text);
}

h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* Savings viz */
.savings-viz {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 16px;
}

.savings-viz-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-mute);
  margin-bottom: 16px;
}

.bar-row { margin-bottom: 16px; }
.bar-row:last-child { margin-bottom: 0; }

.bar-row-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.bar-row-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.bar-track {
  display: flex;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
}

.bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-segment.varta { background: var(--tier-color); }
.bar-segment.saved { background: var(--accent-green); }
.bar-segment.current { background: var(--accent-red); }

/* Two-col */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 700px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

.panel {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
}

.panel h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mute);
  margin-bottom: 12px;
}

.cost-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

.cost-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}

.cost-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.cost-table tr.total-row td {
  border-bottom: none;
  border-top: 2px solid var(--border-strong);
  padding-top: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.cost-table tr.hidden-row td { font-style: italic; color: var(--text-mute); }

.cost-table tr.real-total-row td {
  border-bottom: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-red);
  padding-top: 8px;
}

.check-list { list-style: none; padding: 0; }

.check-list li {
  padding: 7px 0 7px 26px;
  position: relative;
  font-size: 14px;
  color: var(--text-soft);
  border-bottom: 1px dashed var(--border);
  line-height: 1.5;
}

.check-list li:last-child { border-bottom: none; }

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 7px;
  color: var(--accent-green);
  font-weight: 800;
  font-size: 14px;
}

/* Work replaced */
.work-replaced {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
}

.work-replaced h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mute);
  margin-bottom: 14px;
}

.work-rows { display: flex; flex-direction: column; gap: 10px; }

.work-row { display: flex; align-items: center; gap: 12px; }

.work-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--tier-color);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.work-content { flex: 1; min-width: 0; }

.work-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.work-hours { font-size: 12px; color: var(--text-mute); }

/* Savings breakdown */
.savings-breakdown {
  background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(16,185,129,0.02));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 12px;
  padding: 20px 18px;
}

.savings-breakdown h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-green);
  margin-bottom: 14px;
}

.savings-rows { display: flex; flex-direction: column; gap: 8px; }

.savings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
  gap: 12px;
}

.savings-row-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.savings-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.savings-row-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-green);
  white-space: nowrap;
}

.savings-net {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--accent-green);
  color: white;
  border-radius: 8px;
  margin-top: 12px;
  font-weight: 700;
}

.savings-net-label { font-size: 14px; }
.savings-net-value { font-size: 20px; font-weight: 800; }

/* Extras */
.extras-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .extras-grid { grid-template-columns: 1fr 1fr; }
}

.extra-card {
  background: var(--bg-soft);
  border-left: 3px solid var(--tier-color);
  padding: 14px 16px;
  border-radius: 0 8px 8px 0;
}

.extra-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.extra-card-body {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}

/* Not promises */
.not-promises {
  background: rgba(245, 158, 11, 0.08);
  border-left: 4px solid var(--accent-orange);
  padding: 18px 20px;
  border-radius: 0 12px 12px 0;
}

.not-promises h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-orange);
  margin-bottom: 10px;
}

.not-promises ul { margin: 0; padding-left: 20px; }

.not-promises li {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Nav between tiers (detail page footer) */
.tier-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.tier-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
}

.tier-nav a:hover {
  border-color: var(--primary-light);
  text-decoration: none;
}

.tier-nav .center { color: var(--text-mute); font-size: 13px; }

/* Footer */
footer {
  margin-top: 64px;
  padding: 24px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
}

footer p { margin-bottom: 6px; color: var(--text-mute); }

/* ============================================
   LANDING-style sections (index page)
   ============================================ */

/* Bigger hero on landing */
.hero-landing {
  text-align: center;
  padding: 40px 0 48px;
  position: relative;
}

.hero-landing .tagline {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary-light);
  padding: 6px 12px;
  background: rgba(59,130,246,0.1);
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-landing h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -0.5px;
}

@media (min-width: 640px) {
  .hero-landing h1 { font-size: 44px; }
}

@media (min-width: 900px) {
  .hero-landing h1 { font-size: 52px; }
}

.hero-landing .lead {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.55;
}

@media (min-width: 640px) {
  .hero-landing .lead { font-size: 19px; }
}

.hero-cta {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: white !important;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  box-shadow: var(--shadow-hover);
  transition: transform 0.15s;
}

.hero-cta:hover { transform: translateY(-1px); text-decoration: none; }

/* Section title */
.section-title {
  text-align: center;
  margin-bottom: 32px;
}

.section-title .eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-light);
  margin-bottom: 8px;
}

.section-title h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .section-title h2 { font-size: 34px; }
}

.section-title .subtitle {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto;
}

/* Big idea card */
.big-idea {
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(139,92,246,0.04));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  margin: 32px 0 48px;
}

.big-idea-quote {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  max-width: 720px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .big-idea-quote { font-size: 24px; }
}

.big-idea-quote strong { color: var(--primary-light); font-weight: 800; }

/* Services grid (6 blocks) */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  color: white;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.service-badge.s1 { background: var(--tier-1); }
.service-badge.s2 { background: var(--tier-2); }
.service-badge.s3 { background: var(--tier-3); }
.service-badge.s4 { background: var(--tier-4); }
.service-badge.s5 { background: var(--tier-5); }
.service-badge.s6 { background: var(--accent-green); }

.service-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.service-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: 12px;
}

.service-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-bullets li {
  font-size: 12px;
  color: var(--text-mute);
  padding: 4px 0 4px 14px;
  position: relative;
  line-height: 1.5;
}

.service-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-weight: 700;
}

/* AI/IT layer — featured section */
.ai-layer {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e3a8a 50%, #312e81 100%);
  color: white;
  border-radius: 18px;
  padding: 36px 24px;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .ai-layer { padding: 48px 36px; }
}

.ai-layer::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139,92,246,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.ai-layer-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.ai-layer h2 {
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin-bottom: 14px;
  line-height: 1.2;
  position: relative;
}

@media (min-width: 640px) {
  .ai-layer h2 { font-size: 36px; }
}

.ai-layer-lead {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  margin-bottom: 28px;
  line-height: 1.55;
  position: relative;
}

.ai-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  position: relative;
}

@media (min-width: 640px) {
  .ai-features { grid-template-columns: repeat(2, 1fr); }
}

.ai-feature {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 16px 18px;
}

.ai-feature-title {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-feature-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a78bfa;
  flex-shrink: 0;
}

.ai-feature-body {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

/* Market stats */
.market-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

@media (min-width: 700px) {
  .market-stats { grid-template-columns: repeat(4, 1fr); }
}

.market-stat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 14px;
  text-align: center;
}

.market-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-light);
  line-height: 1.05;
  margin-bottom: 6px;
}

@media (min-width: 640px) {
  .market-stat-value { font-size: 28px; }
}

.market-stat-label {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.4;
}

/* ICP section */
.icp {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 48px;
}

.icp h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mute);
  margin-bottom: 16px;
  text-align: center;
}

.icp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  font-size: 14px;
}

@media (min-width: 640px) {
  .icp-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

.icp-col h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.icp-col.yes h4 { color: var(--accent-green); }
.icp-col.no h4 { color: var(--accent-red); }

.icp-col ul {
  list-style: none;
  padding: 0;
}

.icp-col li {
  padding: 6px 0 6px 22px;
  position: relative;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 13px;
}

.icp-col.yes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 800;
}

.icp-col.no li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: var(--accent-red);
  font-weight: 800;
}

/* Print */
@media print {
  .topnav { display: none; }
  body { background: white; color: black; }
  .compare-table, .tier-card, .service-card, .calc-tier, .gloss-item, .method-table { page-break-inside: avoid; box-shadow: none; }
  .ai-layer { background: white; color: black; }
  .ai-layer h2, .ai-layer-lead, .ai-feature-title, .ai-feature-body { color: black; }
}

/* ============================================
   METHODOLOGY + GLOSSARY pages
   ============================================ */
.page-header {
  text-align: center;
  padding: 16px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.page-header .page-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.page-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.page-header .lead { font-size: 15px; color: var(--text-soft); max-width: 660px; margin: 0 auto; line-height: 1.55; }

/* Principle / formula block */
.formula-block {
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(139,92,246,0.04));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}

.formula-line {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.8;
}

.formula-line .op { color: var(--text-mute); font-weight: 600; margin: 0 6px; }
.formula-line .res { color: var(--accent-green); }
.formula-note { font-size: 13px; color: var(--text-soft); margin-top: 12px; line-height: 1.55; }

@media (min-width: 640px) { .formula-line { font-size: 17px; } }

/* Dense data table (constants, definitions) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }

.method-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-width: 460px;
}

.method-table th, .method-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.45;
  color: var(--text-soft);
}

.method-table th {
  background: var(--bg-soft);
  font-weight: 700;
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.method-table td.num, .method-table th.num { text-align: right; white-space: nowrap; font-weight: 600; color: var(--text); }
.method-table tr:last-child td { border-bottom: none; }
.method-table .hl { font-weight: 700; color: var(--text); }

/* Per-tier calculation block */
.calc-tier { margin-bottom: 36px; }

.calc-tier-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.calc-tier-head .tier-pill-lg { margin-bottom: 0; font-size: 12px; padding: 5px 12px; color: #fff; }
.calc-tier-head .tier-pill-lg.t1 { background: var(--tier-1); }
.calc-tier-head .tier-pill-lg.t2 { background: var(--tier-2); }
.calc-tier-head .tier-pill-lg.t3 { background: var(--tier-3); }
.calc-tier-head .tier-pill-lg.t4 { background: var(--tier-4); }
.calc-tier-head .tier-pill-lg.t5 { background: var(--tier-5); }
.calc-tier-head .calc-price { font-weight: 800; font-size: 18px; color: var(--primary-light); }
.calc-tier-head .calc-profile { font-size: 13px; color: var(--text-mute); }

.calc-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.calc-chip {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.calc-chip .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-mute); margin-bottom: 3px; }
.calc-chip .v { font-size: 15px; font-weight: 800; color: var(--text); }
.calc-chip.save .v { color: var(--accent-green); }

/* Glossary */
.gloss-group { margin-bottom: 32px; }

.gloss-group h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-light);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.gloss-item { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.gloss-item:last-child { border-bottom: none; }
.gloss-term { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.gloss-term .orig { font-weight: 500; color: var(--text-mute); font-size: 12px; }
.gloss-def { font-size: 13px; color: var(--text-soft); line-height: 1.5; }

@media (min-width: 700px) {
  .gloss-item { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: baseline; }
  .gloss-term { margin-bottom: 0; }
}
