.third-pillar-page {
  --tp-navy: #002d62;
  --tp-blue: #0788e8;
  --tp-green: #00a97b;
  --tp-soft-blue: #f1f8fd;
  --tp-soft-mint: #effaf7;
  --tp-soft-warm: #fff8ed;
  --tp-table-border: var(--border-soft);
  --tp-table-cell: var(--surface-card);
  --tp-table-header-text: var(--text-primary);
  --tp-table-label-text: var(--text-primary);
  --tp-table-body-text: var(--text-primary);
  color: var(--text-primary);
  background: var(--surface-bg);
}

.tp-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.tp-final-cta { width: min(var(--max), calc(100% - 80px)); margin-inline: auto; }
.tp-section { margin-top: 38px; }
.tp-section h2 { margin: 0; color: var(--tp-navy); font-size: 31px; line-height: 1.08; letter-spacing: -0.025em; }
.tp-section h3 { color: var(--tp-navy); }
.tp-heading { max-width: 820px; margin: 0 auto 28px; text-align: center; }
.tp-heading > p { margin: 10px 0 0; color: var(--text-subtle); font-size: 17px; line-height: 1.55; }
.tp-how .tp-heading { max-width: 820px; margin-bottom: 28px; }
.tp-how h2 { font-size: 31px; line-height: 1.08; letter-spacing: -0.025em; }
.tp-how .tp-heading > p { margin-top: 10px; }
.tp-eyebrow { color: var(--text-accent); font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.tp-hero {
  position: relative;
  width: min(var(--max), calc(100% - 80px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 52%) minmax(0, 48%);
  min-height: 350px;
  align-items: start;
  overflow: hidden;
  background: var(--surface-soft);
}
.tp-hero-copy { position: relative; z-index: 2; grid-column: 1; grid-row: 1; align-self: start; max-width: 600px; padding: 30px 0; }
.tp-hero .tp-eyebrow { margin: 0 0 9px; }
.tp-hero h1 { max-width: 650px; margin: 0; color: var(--tp-navy); font-size: 52px; line-height: 1.16; letter-spacing: 0; }
.third-pillar-page:lang(uk) .tp-hero h1 { font-size: 44px; }
.tp-hero-copy > p:not(.tp-eyebrow) { max-width: 570px; margin: 14px 0 0; color: var(--text-subtle); font-size: 1rem; line-height: 1.45; }
.tp-related a:focus-visible { outline: 3px solid var(--outline-accent); outline-offset: 4px; }
.tp-hero-media { position: absolute; z-index: 0; top: 0; right: 0; left: 0; bottom: auto; height: 350px; min-width: 0; }
.tp-hero-media::after { position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface-bg) 0%, var(--surface-bg) 34%, transparent 70%); content: ""; }
.tp-hero-media > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.tp-features { margin-top: 14px; padding: 15px 18px; border-radius: 14px; background: var(--tp-soft-blue); }
.tp-features ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.tp-features li { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 8px 14px; border-left: 1px solid #dbeaf4; }
.tp-features li:first-child { border-left: 0; }
.tp-features img { flex: 0 0 auto; width: 42px; height: 42px; padding: 9px; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--surface-soft) 84%, var(--text-accent)) 100%, transparent 100%); }
.tp-features strong { color: var(--tp-navy); font-size: 13px; line-height: 1.3; }

.tp-equation { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.tp-equation > article { padding: 24px 18px; border-radius: 14px; background: var(--tp-soft-blue); text-align: center; }
.tp-equation > article.tp-equation-result { background: var(--tp-soft-mint); }
.tp-equation > span { align-self: center; color: var(--tp-navy); font-size: 30px; font-weight: 800; }
.tp-equation img { display: block; width: 52px; height: 52px; margin: 0 auto 8px; padding: 10px; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--surface-soft) 84%, var(--text-accent)) 100%, transparent 100%); }
.tp-equation h3 { margin: 0 0 8px; font-size: 18px; }
.tp-equation p { margin: 0; color: var(--text-subtle); font-size: 14px; line-height: 1.45; }

.tp-benefits { padding: 30px 24px; border-radius: 16px; background: var(--tp-soft-mint); }
.tp-card-grid { display: grid; gap: 14px; }
.tp-card-grid--four { grid-template-columns: repeat(4, 1fr); }
.tp-card-grid article { display: grid; grid-template-columns: 48px 1fr; align-items: center; column-gap: 12px; padding: 20px; border: 1px solid rgba(0,45,98,.07); border-radius: 13px; background: rgba(255,255,255,.7); }
.tp-card-grid img { width: 48px; height: 48px; padding: 10px; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--surface-soft) 84%, var(--text-accent)) 100%, transparent 100%); }
.tp-card-grid h3 { margin: 0; font-size: 17px; }
.tp-card-grid p { grid-column: 2; margin: 0; color: var(--text-subtle); font-size: 14px; line-height: 1.45; }

.tp-audience-compare { display: grid; grid-template-columns: 1.08fr .92fr; gap: 18px; align-items: stretch; }
.tp-panel { min-width: 0; padding: 26px; border-radius: 16px; }
.tp-panel > p { margin: 10px 0 20px; color: var(--text-subtle); font-size: 17px; line-height: 1.55; }
.tp-audience, .tp-comparison { background: var(--tp-soft-blue); }
.tp-audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tp-audience-grid article { text-align: center; }
.tp-audience-grid img { display: block; width: 52px; height: 52px; margin: 0 auto; padding: 11px; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--surface-soft) 84%, var(--text-accent)) 100%, transparent 100%); }
.tp-audience-grid h3 { margin: 8px 0 5px; font-size: 16px; }
.tp-audience-grid p { margin: 0; color: var(--text-subtle); font-size: 13px; line-height: 1.4; }
.tp-comparison { padding: 18px 16px; border-radius: 14px; }
.tp-comparison h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.15; letter-spacing: -0.015em; }
.tp-comparison > p { margin: 5px 0 12px; font-size: 13px; line-height: 1.35; }
.tp-table-wrap { overflow-x: auto; }
.tp-comparison table { width: 100%; table-layout: fixed; border-collapse: collapse; color: var(--tp-table-body-text); font-size: 11px; }
.tp-comparison th, .tp-comparison td { padding: 6px 7px; border: 1px solid var(--tp-table-border); color: var(--tp-table-body-text); background: var(--tp-table-cell); text-align: center; vertical-align: top; line-height: 1.25; }
.tp-comparison thead th { color: var(--tp-table-header-text); font-weight: 800; }
.tp-comparison thead th:first-child, .tp-comparison tbody th { text-align: left; }
.tp-comparison tbody th { width: 28%; color: var(--tp-table-label-text); font-weight: 800; }

.tp-faq-header { display: block; margin-bottom: 10px; text-align: left; }
.tp-faq-header h2 { margin: 0; color: var(--tp-navy); font-size: clamp(1.6875rem, 2.3vw, 1.9375rem); line-height: 1.22; letter-spacing: 0; }
.tp-faq-header p { margin: 3px 0 0; color: var(--text-subtle); font-size: 0.9375rem; line-height: 1.6; }
.tp-related-header { display: block; margin-bottom: 10px; text-align: left; }
.tp-related-header h2 { margin: 0; color: var(--tp-navy); font-size: clamp(1.6875rem, 2.3vw, 1.9375rem); line-height: 1.22; letter-spacing: 0; }
.tp-source-note { margin: 14px 0 0; color: var(--text-subtle); font-size: 12px; line-height: 1.45; }

.third-pillar-page .cta-section.fg-cta { padding-top: 0; }
.tp-related { margin-bottom: 54px; }
.tp-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tp-related-grid > a { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border-radius: 14px; color: inherit; background: var(--tp-soft-blue); text-decoration: none; }
.tp-related-title-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 18px; align-items: center; width: 100%; }
.tp-related-title-row > img { width: 54px; height: 54px; padding: 14px; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--surface-soft) 84%, var(--text-accent)) 0 100%, transparent 100%); }
.tp-related h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.tp-related-grid > a > p { margin: 6px 0 7px 72px; color: var(--text-subtle); line-height: 1.4; }
.tp-related strong { margin-top: auto; margin-left: 72px; color: var(--text-accent); font-size: 0.9rem; font-weight: 900; }

@media (prefers-color-scheme: dark) {
  .third-pillar-page {
    --tp-navy: var(--text-primary);
    --tp-soft-blue: var(--surface-soft);
    --tp-soft-mint: var(--surface-soft);
    --tp-soft-warm: var(--surface-soft);
    --tp-table-border: var(--border-soft);
    --tp-table-cell: var(--surface-card);
    --tp-table-header-text: var(--text-primary);
    --tp-table-label-text: var(--text-primary);
    --tp-table-body-text: var(--text-primary);
  }
  .tp-card-grid article { background: var(--surface-card); }
  .tp-features li { border-color: var(--border-soft); }
}

@media (max-width: 1040px) {
  .tp-section h2 { font-size: 31px; }
  .tp-how h2 { font-size: 31px; }
  .tp-faq-header h2, .tp-related-header h2 { font-size: 27px; }
  .tp-hero { grid-template-columns: 1fr 1fr; }
  .tp-hero h1 { font-size: clamp(36px, 5vw, 50px); }
  .tp-features ul { grid-template-columns: repeat(2, 1fr); }
  .tp-features li { border: 0; }
  .tp-features li:last-child { grid-column: 1 / -1; }
  .tp-equation { grid-template-columns: 1fr 1fr; }
  .tp-equation > span { display: none; }
  .tp-card-grid--four { grid-template-columns: repeat(2, 1fr); }
  .tp-audience-compare { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .tp-hero { width: min(var(--max), calc(100% - 40px)); grid-template-columns: 1fr; min-height: 0; background: var(--surface-bg); }
  .tp-hero-copy { grid-row: 2; width: 100%; max-width: none; padding: 0 0 16px; }
  .tp-hero-media {
    position: relative;
    inset: auto;
    grid-row: 1;
    height: var(--fg-image-height);
    /* The CTA container is 20px narrower on each side above 680px. */
    margin: var(--fg-image-inset) calc(var(--fg-image-inset) + 20px) 0;
    border-radius: var(--fg-image-radius);
    overflow: hidden;
  }
  .tp-hero-media::after { background: linear-gradient(180deg, transparent calc(100% - 80px), var(--surface-bg)); }
  .tp-hero-media > img { object-position: var(--fg-image-position); }
  .tp-section h2 { font-size: 27px; }
  .tp-how h2 { font-size: 27px; }
}

@media (max-width: 680px) {
  .tp-container { width: min(100% - 28px, 1180px); }
  .tp-final-cta { width: min(var(--max), calc(100% - 40px)); }
  .tp-hero-media { margin-inline: var(--fg-image-inset); }
  .tp-section { margin-top: 30px; }
  .tp-hero h1 { font-size: clamp(2.2rem, 10vw, 3.55rem); line-height: 1.02; }
  .third-pillar-page:lang(uk) .tp-hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .tp-hero-copy > p:not(.tp-eyebrow) { font-size: 17px; }
  .third-pillar-page:lang(uk) .tp-hero-copy > p:not(.tp-eyebrow) { font-size: 16px; }
  .tp-features { padding: 10px; }
  .tp-features ul, .tp-equation, .tp-card-grid--four, .tp-audience-grid, .tp-related-grid { grid-template-columns: 1fr; }
  .tp-features li:last-child { grid-column: auto; }
  .tp-features li { padding: 10px; }
  .tp-equation > article { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; text-align: left; }
  .tp-equation img { grid-row: 1 / 3; width: 50px; height: 50px; margin: 0; }
  .tp-equation h3 { align-self: end; margin: 0 0 4px; }
  .tp-equation p { grid-column: 2; }
  .tp-benefits, .tp-panel { padding: 22px 18px; }
  .tp-comparison { padding: 16px 12px; }
  .tp-comparison h2 { font-size: 21px; }
  .tp-comparison > p { margin: 4px 0 10px; font-size: 12px; }
  .tp-comparison table { min-width: 0; font-size: 10px; }
  .tp-comparison th, .tp-comparison td { padding: 5px 4px; line-height: 1.2; overflow-wrap: anywhere; }
  .tp-audience-grid { gap: 20px; }
  .tp-related-grid > a { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-related a { scroll-behavior: auto; transition: none; }
}
