/* ============================================
   THECPASOLUTIONS - INTERIOR PAGES
   Components used by service, country, case-study,
   insight, pricing, trust and pilot pages.
   Extends the tokens defined in style.css.
   ============================================ */

/* ===== PAGE HERO (compact, for interior pages) ===== */
.page-hero {
  position: relative;
  background: var(--color-navy-900);
  color: var(--color-cream-100);
  padding: var(--space-20) 0 var(--space-16);
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(255, 171, 87, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(35, 13, 79, 0) 55%, rgba(35, 13, 79, 0.55) 100%);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 62rem;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw, 2.7rem);
  line-height: 1.16;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: var(--space-4) 0 var(--space-5);
  text-wrap: balance;
}

.page-hero__title em {
  color: var(--color-gold-500);
}

.page-hero__lead {
  font-size: 1.14rem;
  line-height: 1.72;
  color: rgba(242, 245, 251, 0.82);
  max-width: 44rem;
  margin: 0;
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-8);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 171, 87, 0.24);
}

.page-hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-hero__meta-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-gold-500);
  line-height: 1.1;
}

.page-hero__meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(242, 245, 251, 0.6);
  font-weight: 500;
}

.page-hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.breadcrumb a {
  color: rgba(242, 245, 251, 0.68);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--color-gold-500);
}

.breadcrumb span[aria-current] {
  color: var(--color-gold-500);
}

.breadcrumb__sep {
  color: rgba(242, 245, 251, 0.32);
}

/* ===== GENERIC INTERIOR SECTION =====
   Vertical rhythm matches the original sections (--space-32) so the
   homepage does not jump between spacings at each section boundary. */
.page-section {
  padding: var(--space-32) 0;
}

.page-section--tight { padding: var(--space-20) 0; }
.page-section--cream { background: var(--color-cream-100); }
.page-section--white { background: var(--color-white); }

.page-section__head {
  max-width: 800px;
  margin-bottom: var(--space-16);
}

/* Centred variant, to match .section-header--centered on the homepage. */
.page-section__head--centered {
  margin-inline: auto;
  text-align: center;
}

.page-section__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.18;
  margin: var(--space-3) 0 var(--space-4);
  color: var(--color-navy-900);
  text-wrap: balance;
}

.page-section__head p {
  color: var(--color-ink-500);
  font-size: 1.03rem;
  line-height: 1.75;
  margin: 0;
}

/* ===== TWO-COLUMN ARTICLE LAYOUT WITH STICKY RAIL ===== */
.doc {
  display: grid;
  grid-template-columns: minmax(0, 46rem) minmax(0, 17rem);
  justify-content: space-between;
  gap: var(--space-16);
  align-items: start;
}

/* Inside .doc the grid track sets the measure, not the element. */
.doc > .prose { max-width: none; }

.doc__rail {
  position: sticky;
  top: 7.5rem;
  border-left: 2px solid var(--color-cream-300);
  padding-left: var(--space-5);
}

.doc__rail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-ink-400);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.doc__rail ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

.doc__rail a {
  color: var(--color-ink-500);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.doc__rail a:hover { color: var(--color-navy-900); }

.doc__rail-cta {
  margin-top: var(--space-8);
  padding: var(--space-5);
  background: var(--color-navy-900);
  border-radius: var(--radius-lg);
  color: var(--color-cream-100);
}

.doc__rail-cta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
  color: var(--color-white);
}

.doc__rail-cta p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(242, 245, 251, 0.75);
  margin: 0 0 var(--space-4);
}

/* ===== PROSE ===== */
.prose {
  max-width: 42rem;
  color: var(--color-ink-700);
  font-size: 1.04rem;
  line-height: 1.78;
}

.prose > * + * { margin-top: var(--space-5); }

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.62rem;
  font-weight: 600;
  color: var(--color-navy-900);
  letter-spacing: -0.015em;
  line-height: 1.26;
  margin-top: var(--space-12);
  scroll-margin-top: 7rem;
}

.prose h3 {
  font-family: var(--font-body);
  font-size: 1.06rem;
  font-weight: 650;
  color: var(--color-navy-900);
  margin-top: var(--space-8);
  scroll-margin-top: 7rem;
}

.prose p { margin: 0; }

.prose strong { color: var(--color-navy-900); font-weight: 600; }

.prose a {
  color: var(--color-navy-700);
  text-decoration: underline;
  text-decoration-color: var(--color-gold-400);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.prose a:hover { color: var(--color-gold-700); }

.prose ul, .prose ol {
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.prose li { line-height: 1.7; }
.prose li::marker { color: var(--color-gold-600); }

.prose blockquote {
  border-left: 3px solid var(--color-gold-500);
  padding-left: var(--space-5);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--color-navy-800);
}

/* ===== CHECK LIST (deliverables) ===== */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.checklist--two { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.checklist li {
  position: relative;
  padding-left: var(--space-8);
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--color-ink-700);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.34em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--color-gold-100);
  border: 1px solid var(--color-gold-400);
}

.checklist li::after {
  content: '';
  position: absolute;
  left: 0.31rem;
  top: 0.58em;
  width: 0.42rem;
  height: 0.22rem;
  border-left: 1.6px solid var(--color-gold-700);
  border-bottom: 1.6px solid var(--color-gold-700);
  transform: rotate(-45deg);
}

.checklist li strong {
  color: var(--color-navy-900);
  font-weight: 600;
}

/* ===== SPEC TABLE (forms, deadlines, software) ===== */
.spec-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-lg);
  background: var(--color-white);
}

.spec {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.spec th,
.spec td {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-cream-200);
  vertical-align: top;
}

.spec thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 600;
  color: var(--color-ink-500);
  background: var(--color-cream-100);
  border-bottom: 1px solid var(--color-cream-300);
  white-space: nowrap;
}

.spec tbody tr:last-child td { border-bottom: 0; }

.spec td:first-child {
  font-weight: 600;
  color: var(--color-navy-900);
  min-width: 11rem;
}

.spec td { color: var(--color-ink-500); line-height: 1.6; }

.spec .num { font-variant-numeric: tabular-nums; }

/* ===== COST COMPARISON ===== */
.cost {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--space-5);
  align-items: stretch;
}

.cost__card {
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
}

.cost__card--ours {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: var(--color-cream-100);
  box-shadow: var(--shadow-lg);
}

.cost__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 600;
  color: var(--color-ink-400);
  margin-bottom: var(--space-3);
}

.cost__card--ours .cost__label { color: var(--color-gold-500); }

.cost__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-navy-900);
  margin-bottom: var(--space-5);
  line-height: 1.25;
}

.cost__card--ours .cost__title { color: var(--color-white); }

.cost__rows {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.cost__rows li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 0.91rem;
  line-height: 1.5;
  color: var(--color-ink-500);
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--color-cream-300);
}

.cost__card--ours .cost__rows li {
  color: rgba(242, 245, 251, 0.78);
  border-bottom-color: rgba(255, 171, 87, 0.2);
}

.cost__rows b {
  font-weight: 600;
  color: var(--color-navy-900);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cost__card--ours .cost__rows b { color: var(--color-gold-400); }

.cost__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 2px solid var(--color-cream-300);
}

.cost__card--ours .cost__total { border-top-color: rgba(255, 171, 87, 0.4); }

.cost__total span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-ink-500);
}

.cost__card--ours .cost__total span { color: rgba(242, 245, 251, 0.7); }

.cost__total strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-navy-900);
  font-variant-numeric: tabular-nums;
}

.cost__card--ours .cost__total strong { color: var(--color-gold-500); }

/* ===== SAVINGS CALCULATOR ===== */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-cream-300);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

.calc__controls { padding: var(--space-10); }

.calc__field { margin-bottom: var(--space-8); }

.calc__field:last-child { margin-bottom: 0; }

.calc__field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.calc__field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-navy-900);
}

.calc__readout {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--color-gold-700);
  font-variant-numeric: tabular-nums;
}

.calc__hint {
  font-size: 0.78rem;
  color: var(--color-ink-400);
  margin-top: var(--space-2);
  line-height: 1.5;
}

.calc input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: var(--color-cream-300);
  outline: none;
}

.calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-navy-900);
  border: 3px solid var(--color-gold-500);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.calc input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }

.calc input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-navy-900);
  border: 3px solid var(--color-gold-500);
  cursor: pointer;
}

.calc input[type="range"]:focus-visible {
  outline: 2px solid var(--color-gold-600);
  outline-offset: 4px;
}

.calc__segments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.calc__segment {
  flex: 1 1 auto;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-cream-300);
  background: var(--color-white);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--color-ink-500);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.calc__segment:hover { border-color: var(--color-gold-400); color: var(--color-navy-900); }

.calc__segment[aria-pressed="true"] {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: var(--color-gold-400);
}

.calc__result {
  background: var(--color-navy-900);
  color: var(--color-cream-100);
  padding: var(--space-10);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc__result-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--color-gold-500);
  margin-bottom: var(--space-3);
}

.calc__headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  color: var(--color-white);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.calc__headline-sub {
  font-size: 0.92rem;
  color: rgba(242, 245, 251, 0.68);
  margin-top: var(--space-3);
  line-height: 1.6;
}

.calc__breakdown {
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: var(--space-6) 0 0;
  border-top: 1px solid rgba(255, 171, 87, 0.24);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.calc__breakdown li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 0.9rem;
  color: rgba(242, 245, 251, 0.78);
}

.calc__breakdown b {
  font-weight: 600;
  color: var(--color-white);
  font-variant-numeric: tabular-nums;
}

.calc__disclaimer {
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(242, 245, 251, 0.5);
  margin: var(--space-6) 0 0;
}

/* ===== CASE STUDIES ===== */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: var(--space-6);
}

.case-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-gold-400);
}

.case-card__flagline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--color-ink-400);
  margin-bottom: var(--space-4);
}

.case-card__flagline .flag-inline { width: 1.1rem; height: 0.8rem; }

.case-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-navy-900);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.012em;
}

.case-card__summary {
  font-size: 0.94rem;
  line-height: 1.68;
  color: var(--color-ink-500);
  margin: 0 0 var(--space-6);
  flex: 1;
}

.case-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-cream-200);
}

.case-card__metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-gold-700);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.case-card__metric span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-ink-400);
  font-weight: 500;
}

/* Case study detail */
.case-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1px;
  background: var(--color-cream-300);
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.case-metrics__cell {
  background: var(--color-white);
  padding: var(--space-6);
}

.case-metrics__value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--color-navy-900);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.case-metrics__label {
  font-size: 0.78rem;
  color: var(--color-ink-500);
  margin-top: var(--space-2);
  line-height: 1.5;
}

.ba {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-5);
}

.ba__col {
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  border: 1px solid var(--color-cream-300);
  background: var(--color-white);
}

.ba__col--after {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: var(--color-cream-100);
}

.ba__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--color-ink-400);
  margin-bottom: var(--space-4);
}

.ba__col--after .ba__label { color: var(--color-gold-500); }

.ba__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ba__col li {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--color-ink-500);
  padding-left: var(--space-5);
  position: relative;
}

.ba__col li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--color-ink-300);
}

.ba__col--after li { color: rgba(242, 245, 251, 0.82); }
.ba__col--after li::before { content: '✓'; color: var(--color-gold-500); font-size: 0.8rem; }

.verify-note {
  margin-top: var(--space-8);
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--color-gold-500);
  background: var(--color-gold-100);
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--color-ink-700);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.verify-note strong { color: var(--color-navy-900); }

/* ===== INSIGHTS / BLOG ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-6);
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-gold-400);
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-ink-400);
  margin-bottom: var(--space-4);
}

.post-card__tag {
  color: var(--color-gold-700);
  background: var(--color-gold-100);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.34;
  color: var(--color-navy-900);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}

.post-card__excerpt {
  font-size: 0.92rem;
  line-height: 1.68;
  color: var(--color-ink-500);
  margin: 0 0 var(--space-5);
  flex: 1;
}

.post-card__more {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-navy-700);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: 0.8rem;
  color: rgba(242, 245, 251, 0.66);
  margin-top: var(--space-6);
  letter-spacing: 0.04em;
}

/* ===== CARD GRID (services / countries index) ===== */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: var(--space-5);
}

.link-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-gold-400);
}

.link-card__icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-md);
  background: var(--color-gold-100);
  color: var(--color-gold-700);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-5);
  flex-shrink: 0;
}

.link-card__icon svg { width: 1.25rem; height: 1.25rem; }

.link-card__title {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--color-navy-900);
  margin: 0 0 var(--space-3);
  line-height: 1.3;
}

.link-card__desc {
  font-size: 0.92rem;
  line-height: 1.66;
  color: var(--color-ink-500);
  margin: 0 0 var(--space-5);
  flex: 1;
}

.link-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.link-card__tag {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--color-cream-200);
  color: var(--color-ink-500);
  font-weight: 500;
}

.link-card__more {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-navy-700);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
}

.link-card:hover .link-card__more { color: var(--color-gold-700); }

/* ===== PILOT STEPS ===== */
.pilot-steps {
  list-style: none;
  counter-reset: pilot;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-6);
}

.pilot-steps li {
  counter-increment: pilot;
  position: relative;
  padding-top: var(--space-8);
  border-top: 2px solid var(--color-cream-300);
}

.pilot-steps li::before {
  content: 'Step ' counter(pilot);
  position: absolute;
  top: var(--space-3);
  left: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 700;
  color: var(--color-gold-700);
}

.pilot-steps h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--color-navy-900);
  margin: 0 0 var(--space-3);
  line-height: 1.3;
}

.pilot-steps p {
  font-size: 0.93rem;
  line-height: 1.68;
  color: var(--color-ink-500);
  margin: 0;
}

.pilot-steps em {
  display: block;
  margin-top: var(--space-3);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-400);
}

/* ===== FACT STRIP ===== */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1px;
  background: var(--color-cream-300);
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.facts__cell {
  background: var(--color-white);
  padding: var(--space-7) var(--space-6);
}

.facts__value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--color-navy-900);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.facts__label {
  font-size: 0.8rem;
  color: var(--color-ink-500);
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* ===== CTA BAND ===== */
.cta-band {
  background: var(--color-navy-900);
  color: var(--color-cream-100);
  padding: var(--space-16) 0;
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(50rem 24rem at 78% 120%, rgba(255, 171, 87, 0.15), transparent 60%);
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.cta-band__text { max-width: 36rem; }

.cta-band__text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0 0 var(--space-3);
  color: var(--color-white);
  text-wrap: balance;
}

.cta-band__text p {
  color: rgba(242, 245, 251, 0.75);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ===== RELATED LINKS ===== */
.related {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.related a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-cream-300);
  border-radius: 99px;
  background: var(--color-white);
  color: var(--color-navy-800);
  font-size: 0.87rem;
  font-weight: 550;
  text-decoration: none;
  transition: all 0.2s ease;
}

.related a:hover {
  border-color: var(--color-gold-500);
  color: var(--color-gold-700);
  transform: translateY(-2px);
}

.related .flag-inline { width: 1.05rem; height: 0.78rem; }

/* ===== NAV ADDITIONS ===== */
/* The current section is marked in the primary nav. Matches the hover
   underline so the active state reads as the same language, not a new one. */
.nav__link--active {
  color: var(--color-navy-900);
  font-weight: 600;
}

.nav__link--active::after {
  transform: scaleX(1);
}

/* Flags inside dropdown items need a baseline nudge and a gap. */
.dropdown li a .flag-inline {
  width: 1.1rem;
  height: 0.8rem;
  margin-right: 0.5rem;
  vertical-align: -0.08em;
  border-radius: 2px;
}

/* Footer country links use the same treatment. */
.footer__col .flag-inline {
  width: 1rem;
  height: 0.72rem;
  margin-right: 0.45rem;
  vertical-align: -0.05em;
  border-radius: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-10);
  }

  .doc__rail {
    position: static;
    border-left: 0;
    border-top: 2px solid var(--color-cream-300);
    padding-left: 0;
    padding-top: var(--space-6);
    order: 2;
  }

  .doc__rail ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
  }

  .calc { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .page-hero { padding: var(--space-12) 0 var(--space-10); }
  .page-hero__meta { gap: var(--space-5); }
  .calc__controls,
  .calc__result { padding: var(--space-7); }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .prose { max-width: none; }
  .case-metrics__value { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .case-card,
  .post-card,
  .link-card,
  .related a { transition: none; }
  .case-card:hover,
  .post-card:hover,
  .link-card:hover,
  .related a:hover { transform: none; }
}

/* ============================================
   ON-DARK ACCENT SWITCH

   Befree uses its indigo (#3230E0) as the accent on light grounds and its
   warm tones (#FFAB57 / #FF668D) on dark ones - indigo on the dark purple
   is roughly 1.9:1 and effectively invisible.

   Rather than rewrite every accent rule, the accent ramp is redefined on
   the dark containers. Custom properties inherit, so every descendant that
   already reads --color-gold-* picks up the warm value automatically.
   ============================================ */
.top-bar,
.hero,
.founder,
.final-cta,
.footer,
.service-card--featured,
.team-dossier__card--featured,
.pricing-tier--featured,
.tab--active,
.proc-split__meta,
.page-hero,
.cta-band,
.doc__rail-cta,
.calc__result,
.cost__card--ours,
.ba__col--after {
  --color-gold-700: var(--color-accent-warm);
  --color-gold-600: var(--color-accent-warm);
  --color-gold-500: var(--color-accent-warm);
  --color-gold-400: #ffc68f;
  --color-gold-300: #ffdcb8;
  --color-gold-100: rgba(255, 171, 87, 0.14);
}

/* Light surfaces that sit inside those dark sections take the indigo
   accent back, or the warm tone would be unreadable on near-white. */
.contact-form,
.founder__profile {
  --color-gold-700: #2a28c4;
  --color-gold-600: #3230e0;
  --color-gold-500: #3230e0;
  --color-gold-400: #8b89f0;
  --color-gold-300: #c3c2f7;
  --color-gold-100: #eef1f8;
}

/* ===== ALIGNMENT CORRECTIONS ===== */

/* .prose ul out-specifies .checklist, which was forcing checklists back to an
   indented flex list. Restate the checklist layout at matching specificity. */
.prose .checklist,
.prose .checklist--two {
  padding-left: 0;
  display: grid;
  gap: var(--space-3);
}

.prose .checklist--two {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.prose .checklist li { padding-left: var(--space-8); }

/* Centred pill row, replacing per-page inline styles. */
.related--center { justify-content: center; }

/* Software / tooling strip - replaces a one-cell .facts grid that was being
   forced full width with an inline style. */
.stack {
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  padding: var(--space-7) var(--space-8);
}

.stack__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack__list li {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-ink-700);
  background: var(--color-cream-100);
  border: 1px solid var(--color-cream-300);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
}

/* Country hero: the flag used to sit inline inside the h1, where it never
   aligned to the cap height. It is now its own block above the title. */
.page-hero__flag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  border: 1px solid rgba(255, 171, 87, 0.32);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
}

.page-hero__flag svg {
  width: 1.75rem;
  height: 1.17rem;
  border-radius: 2px;
  display: block;
}

.page-hero__flag span {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-cream-100);
}

/* Segment buttons sized to their content rather than stretched to fill. */
.calc__segment { flex: 0 1 auto; }

/* Section heads sitting directly above a grid need the same bottom margin
   as the ones above prose, or the grids ride up. */
.page-section__head:last-child { margin-bottom: 0; }

/* Utilities that replace the per-page inline styles the pages used to carry. */
.page-section--flush-top { padding-top: 0; }

/* Small section head, for the "Related" / "We also work in" rows. */
.page-section__head--sm {
  margin-bottom: var(--space-6);
}

.page-section__head--sm h2 {
  font-size: 1.3rem;
  margin: 0;
}

/* Caveat text under tables and calculators. */
.note {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--color-ink-400);
  max-width: 46rem;
  margin: var(--space-6) 0 0;
}

/* Attribution line directly under a pull quote. */
.quote-attrib {
  font-size: 0.88rem;
  color: var(--color-ink-500);
  margin-top: var(--space-3) !important;
}

.quote-attrib strong { color: var(--color-navy-900); }

.related--spaced { margin-top: var(--space-12); }
.related--tight { margin-top: var(--space-8); }

/* Country cards on the homepage show a flag rather than a line icon. */
.link-card__icon--flag {
  background: transparent;
  padding: 0;
  width: auto;
  height: auto;
}

.link-card__icon--flag svg {
  width: 2.4rem;
  height: 1.6rem;
  border-radius: 3px;
}

.spec a { color: inherit; text-decoration: none; }
.spec a:hover { color: var(--color-gold-700); }

/* Outline buttons on the dark page banner and CTA band. .btn--ghost is dark
   purple text on a dark purple border, which disappeared entirely against
   these dark purple grounds - the "Book a call" button was invisible on every
   interior page. */
.page-hero .btn--ghost,
.cta-band .btn--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
}

.page-hero .btn--ghost:hover,
.cta-band .btn--ghost:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* A second head within one section needs clearance from the block above it. */
.page-section__head--spaced { margin-top: var(--space-20); }

/* Sora is wider than the serif these headings were sized for. Balance the
   ragged edge and never let a long word push a column sideways. */
.hero__title,
.section-title,
.final-cta__title,
.page-hero__title,
.founder__quote {
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Headings carried the serif's tight tracking; Sora needs a little less. */
.page-section__head h2,
.prose h2 { letter-spacing: -0.015em; }
