/*
Theme Name: Tabella Pensioni Editorial Theme
Theme URI: https://tabella-pensioni.com/
Author: Osservatorio Tabella Pensioni
Description: Tema editoriale autonomo ad alte prestazioni per l'analisi previdenziale Italia (INPS) e Svizzera Italiana (AVS/LPP Ticino). Zero dipendenze esterne, SEO/GEO nativo, accessibilita WCAG 2.1 AA.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: tabella-pensioni
*/

:root {
  --tp-navy: #0b2d5b;
  --tp-blue: #134e9b;
  --tp-blue-soft: #eef4fb;
  --tp-ink: #1e293b;
  --tp-muted: #475569;
  --tp-bg: #f6f7f9;
  --tp-card: #ffffff;
  --tp-border: #dbe2ea;
  --tp-danger: #b42318;
  --tp-danger-bg: #fef3f2;
  --tp-danger-border: #fecdca;
  --tp-success: #067647;
  --tp-success-bg: #ecfdf3;
  --tp-success-border: #abefc6;
  --tp-warn: #b54708;
  --tp-warn-bg: #fffaeb;
  --tp-warn-border: #fedf89;
  --tp-radius: 10px;
  --tp-shadow: 0 2px 12px rgba(11, 45, 91, 0.06);
  --tp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--tp-bg);
  color: var(--tp-ink);
  font-family: var(--tp-font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--tp-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--tp-navy);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Accessibility Skip Link (WCAG 2.1 AA / EAA) */
.tp-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.tp-skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 10px 16px;
  background: var(--tp-navy);
  color: #ffffff;
  font-weight: 700;
  border-radius: 6px;
  z-index: 999999;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Page Shell */
.tp-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Editorial Header */
.tp-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--tp-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(11, 45, 91, 0.05);
}

.tp-topbar__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--tp-navy);
}

.tp-brand__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.tp-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.tp-brand__name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tp-navy);
}

.tp-brand__name span {
  color: var(--tp-blue);
}

.tp-brand__sub {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tp-muted);
  margin-top: 2px;
}

.tp-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  background: var(--tp-navy);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.tp-header-cta:hover {
  background: var(--tp-blue);
  color: #ffffff;
}

/* Sub-Nav Breadcrumbs */
.tp-subnav {
  background: var(--tp-blue-soft);
  border-top: 1px solid var(--tp-border);
}

.tp-subnav__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 7px 18px;
}

.tp-crumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--tp-muted);
}

.tp-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tp-crumbs li + li::before {
  content: "/";
  color: #94a3b8;
}

.tp-crumbs a {
  color: var(--tp-blue);
  text-decoration: none;
  font-weight: 600;
}

.tp-crumbs a:hover {
  text-decoration: underline;
}

.tp-icon-home {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Main Article Container */
.tp-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 920px;
  margin: 22px auto 40px;
  padding: 0 16px;
}

.tp-article {
  background: var(--tp-card);
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  box-shadow: var(--tp-shadow);
  overflow: hidden;
}

/* Hero Banner */
.tp-hero {
  position: relative;
  background: var(--tp-navy);
}

.tp-hero__img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tp-hero__badge {
  background: #082042;
  color: #e2eeff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tp-hero__badge-tag {
  color: #93c5fd;
  font-weight: 700;
}

/* Article Body */
.tp-body {
  padding: 28px 34px 36px;
}

.tp-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 13.5px;
  color: var(--tp-muted);
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--tp-border);
}

.tp-byline strong {
  color: var(--tp-ink);
}

.tp-geo-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--tp-blue-soft);
  color: var(--tp-navy);
  border: 1px solid #c7daf5;
}

.tp-article h1,
.tp-h1 {
  margin: 0 0 14px;
  font-size: clamp(25px, 3.6vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--tp-navy);
  font-weight: 800;
}

.tp-lead {
  font-size: 18.5px;
  line-height: 1.55;
  color: #334155;
  margin: 0 0 22px;
  font-weight: 500;
}

.tp-article h2,
.tp-h2 {
  margin: 30px 0 12px;
  font-size: clamp(20px, 2.5vw, 24px);
  line-height: 1.3;
  color: var(--tp-navy);
  font-weight: 800;
  border-bottom: 2px solid var(--tp-blue-soft);
  padding-bottom: 6px;
}

.tp-article h3,
.tp-h3 {
  margin: 22px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  color: #0f172a;
  font-weight: 700;
}

.tp-article p {
  margin: 0 0 15px;
}

/* Quick Answer Box (GEO / AI Overviews / Speakable target) */
.tp-quick-answer {
  background: var(--tp-blue-soft);
  border-left: 4px solid var(--tp-blue);
  border-radius: 0 var(--tp-radius) var(--tp-radius) 0;
  padding: 18px 20px;
  margin: 0 0 24px;
}

.tp-quick-answer__title {
  margin: 0 0 8px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tp-navy);
  font-weight: 800;
}

.tp-quick-answer p:last-child,
.tp-quick-answer ul:last-child {
  margin-bottom: 0;
}

.tp-quick-answer ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.tp-quick-answer li {
  margin-bottom: 6px;
}

/* SEO Tables & Info Boxes */
.tp-seo-box {
  background: #f8fafc;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  padding: 20px 22px;
  margin: 24px 0;
}

.tp-seo-box > h2:first-child {
  margin-top: 0;
}

.tp-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0 18px;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background: #ffffff;
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}

.tp-table th {
  background: var(--tp-navy);
  color: #ffffff;
  text-align: left;
  padding: 11px 13px;
  font-weight: 700;
  font-size: 14px;
}

.tp-table td {
  padding: 10px 13px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.tp-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.tp-table tbody tr:last-child td {
  border-bottom: none;
}

.tp-num-neg {
  color: var(--tp-danger);
  font-weight: 700;
}

.tp-num-pos {
  color: var(--tp-success);
  font-weight: 700;
}

.tp-checklist {
  margin: 10px 0 0;
  padding-left: 20px;
}

.tp-checklist li {
  margin-bottom: 8px;
}

/* Alert & PDF Download Card */
.tp-alert-box {
  background: var(--tp-warn-bg);
  border: 1px solid var(--tp-warn-border);
  border-left: 4px solid var(--tp-warn);
  border-radius: 8px;
  padding: 15px 18px;
  margin: 20px 0;
  font-size: 15.5px;
}

.tp-pdf-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #c7daf5;
  border-left: 4px solid var(--tp-navy);
  border-radius: 9px;
  padding: 16px 20px;
  margin: 22px 0;
}

.tp-pdf-card__btn {
  display: inline-block;
  background: var(--tp-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 14.5px;
  padding: 10px 16px;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
}

.tp-pdf-card__btn:hover {
  background: var(--tp-navy);
  color: #ffffff;
}

/* =====================================================================
   PART 1 OF FUNNEL: Personal Loss Calculator 2027 (IT EUR / CH-TI CHF)
   ===================================================================== */
.tp-calc {
  background: #ffffff;
  border: 2px solid var(--tp-navy);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 26px 0;
  box-shadow: 0 6px 22px rgba(11, 45, 91, 0.08);
}

.tp-calc__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tp-calc__title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--tp-navy);
}

.tp-calc-tabs {
  display: inline-flex;
  background: var(--tp-blue-soft);
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
}

.tp-calc-tab {
  border: none;
  background: transparent;
  color: var(--tp-navy);
  font-weight: 700;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.tp-calc-tab.is-active {
  background: var(--tp-navy);
  color: #ffffff;
}

.tp-calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.tp-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tp-ink);
  margin-bottom: 5px;
}

.tp-field input,
.tp-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 16px;
  font-family: inherit;
  color: var(--tp-ink);
  background: #ffffff;
}

.tp-loss-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tp-loss-kpi {
  background: #f8fafc;
  border: 1px solid var(--tp-border);
  border-radius: 9px;
  padding: 14px;
}

.tp-loss-kpi--danger {
  background: var(--tp-danger-bg);
  border-color: var(--tp-danger-border);
}

.tp-loss-kpi--success {
  background: var(--tp-success-bg);
  border-color: var(--tp-success-border);
}

.tp-loss-kpi__lbl {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--tp-muted);
  margin-bottom: 4px;
}

.tp-loss-kpi__val {
  font-size: 24px;
  font-weight: 800;
  color: var(--tp-navy);
  line-height: 1.2;
}

.tp-loss-kpi--danger .tp-loss-kpi__val {
  color: var(--tp-danger);
}

.tp-loss-kpi--success .tp-loss-kpi__val {
  color: var(--tp-success);
}

.tp-loss-kpi__sub {
  font-size: 12.5px;
  color: var(--tp-muted);
  margin-top: 4px;
}

.tp-calc-note {
  font-size: 14px;
  color: var(--tp-muted);
  background: #f8fafc;
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 16px;
}

.tp-calc-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--tp-success);
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  padding: 13px 18px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.tp-calc-cta:hover {
  background: #055f39;
  color: #ffffff;
}

/* =====================================================================
   PART 2 OF FUNNEL: 4-Way Italian/Swiss Asset Comparison
   ===================================================================== */
.tp-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.tp-compare-card {
  background: #ffffff;
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  padding: 16px 18px;
}

.tp-compare-card--highlight {
  border: 2px solid var(--tp-blue);
  background: #f8fbff;
  box-shadow: 0 4px 14px rgba(19, 78, 155, 0.08);
}

.tp-compare-card__tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  margin-bottom: 8px;
}

.tp-compare-card--highlight .tp-compare-card__tag {
  background: var(--tp-blue);
  color: #ffffff;
}

.tp-compare-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--tp-navy);
}

.tp-compare-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14.5px;
}

.tp-compare-card li {
  margin-bottom: 5px;
}

/* =====================================================================
   PART 3 OF FUNNEL: 14-Day Editorial Review + SEPA Proof Card
   ===================================================================== */
.tp-review-box {
  background: #f8fafc;
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 26px 0;
}

.tp-timeline {
  list-style: none;
  margin: 14px 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tp-timeline li {
  background: #ffffff;
  border: 1px solid var(--tp-border);
  border-left: 4px solid var(--tp-blue);
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 15.5px;
}

.tp-sepa-card {
  background: #ffffff;
  border: 1px solid #b7d7c8;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 16px;
}

.tp-sepa-card__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed #cbd5e1;
}

.tp-sepa-stamp {
  background: var(--tp-success-bg);
  color: var(--tp-success);
  border: 1px solid var(--tp-success-border);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.tp-sepa-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  font-size: 14.5px;
}

/* =====================================================================
   PART 4 OF FUNNEL: 3-Step Micro-Quiz & Lead Form (#form)
   ===================================================================== */
.tp-quiz-wrap {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
  border: 2px solid var(--tp-navy);
  border-radius: 12px;
  padding: 26px 26px 24px;
  margin: 30px 0;
  box-shadow: 0 8px 28px rgba(11, 45, 91, 0.1);
}

.tp-quiz-header {
  text-align: center;
  margin-bottom: 18px;
}

.tp-quiz-header h2 {
  margin: 0 0 6px;
  border: none;
  padding: 0;
  font-size: 23px;
  color: var(--tp-navy);
}

.tp-quiz-header p {
  margin: 0;
  font-size: 15px;
  color: var(--tp-muted);
}

.tp-quiz-progress {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
}

.tp-quiz-progress__bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #dbe2ea;
  transition: background 0.2s ease;
}

.tp-quiz-progress__bar.is-done {
  background: var(--tp-success);
}

.tp-quiz-progress__bar.is-active {
  background: var(--tp-blue);
}

.tp-quiz-step {
  display: none;
}

.tp-quiz-step.is-active {
  display: block;
}

.tp-quiz-q {
  font-size: 18px;
  font-weight: 800;
  color: var(--tp-navy);
  margin: 0 0 14px;
}

.tp-quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tp-quiz-opt {
  text-align: left;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 9px;
  padding: 13px 15px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--tp-ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tp-quiz-opt:hover,
.tp-quiz-opt.is-selected {
  border-color: var(--tp-blue);
  background: var(--tp-blue-soft);
  color: var(--tp-navy);
}

.tp-quiz-opt span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--tp-muted);
  margin-top: 2px;
}

.tp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.tp-form-grid .tp-field--full {
  grid-column: 1 / -1;
}

.tp-phone-row {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 8px;
}

.tp-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #334155;
  margin: 12px 0 16px;
}

.tp-consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--tp-navy);
}

.tp-submit-btn {
  width: 100%;
  padding: 15px 20px;
  background: var(--tp-success);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tp-submit-btn:hover {
  background: #055f39;
}

.tp-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.tp-quiz-back {
  background: none;
  border: none;
  color: var(--tp-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 0;
  margin-bottom: 8px;
  cursor: pointer;
  text-decoration: underline;
}

.tp-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--tp-muted);
}

.tp-form-status {
  margin-top: 12px;
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
  min-height: 22px;
}

.tp-form-status.is-error {
  color: var(--tp-danger);
}

.tp-form-status.is-ok {
  color: var(--tp-success);
}

/* FAQ Section (matches Speakable & FAQPage JSON-LD selector .faq-item) */
.tp-faq-section {
  margin: 30px 0 24px;
}

.faq-item {
  background: #f8fafc;
  border: 1px solid var(--tp-border);
  border-radius: 9px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.faq-item h3 {
  margin: 0 0 7px;
  font-size: 17px;
  color: var(--tp-navy);
}

.faq-item p {
  margin: 0;
  font-size: 15.5px;
  color: #334155;
}

/* Reader Comments */
.tp-comments {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--tp-border);
}

.tp-comment-card {
  background: #f8fafc;
  border: 1px solid var(--tp-border);
  border-radius: 9px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.tp-comment-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 13.5px;
  color: var(--tp-muted);
  margin-bottom: 6px;
}

.tp-comment-card__meta strong {
  color: var(--tp-navy);
}

.tp-comment-card p {
  margin: 0;
  font-size: 15px;
}

/* Footer & Cross-Cluster Archive Navigation */
.tp-footer {
  background: #0b2242;
  color: #cbd5e1;
  padding: 34px 18px 28px;
  margin-top: auto;
}

.tp-footer__inner {
  max-width: 1040px;
  margin: 0 auto;
}

.tp-archive-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
  padding-bottom: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.tp-archive-col h4 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #93c5fd;
}

.tp-archive-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tp-archive-col li {
  margin-bottom: 6px;
  font-size: 14px;
}

.tp-archive-col a {
  color: #e2e8f0;
  text-decoration: none;
}

.tp-archive-col a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.tp-legal-disclaimer {
  font-size: 12.5px;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0 0 16px;
}

.tp-legal-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 18px;
  font-size: 13px;
}

.tp-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tp-legal-links button {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 13px;
  font-family: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.tp-legal-links button:hover {
  color: #ffffff;
}

/* Legal Modal */
.tp-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 34, 66, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.tp-modal.is-open {
  display: flex;
}

.tp-modal__dialog {
  background: #ffffff;
  color: var(--tp-ink);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.tp-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--tp-border);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.tp-modal__head h3 {
  margin: 0;
  font-size: 20px;
  color: var(--tp-navy);
}

.tp-modal__close {
  background: var(--tp-blue-soft);
  color: var(--tp-navy);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Responsive Breakpoints */
@media (max-width: 780px) {
  .tp-body {
    padding: 20px 18px 28px;
  }
  .tp-calc-grid,
  .tp-loss-grid,
  .tp-compare-grid,
  .tp-quiz-options,
  .tp-form-grid,
  .tp-sepa-rows,
  .tp-archive-nav {
    grid-template-columns: 1fr;
  }
  .tp-phone-row {
    grid-template-columns: 132px 1fr;
  }
  .tp-topbar__inner {
    padding: 10px 14px;
  }
  .tp-brand__name {
    font-size: 18px;
  }
  .tp-header-cta {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* =====================================================================
   v1.1 GEO ISOLATION & 3-ZONE CRO ENHANCEMENTS
   ===================================================================== */
.tp-calc-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 7px;
  background: var(--tp-blue-soft);
  color: var(--tp-navy);
  font-size: 13.5px;
  font-weight: 800;
  border: 1px solid #c7daf5;
}

.tp-calc-badge--ch {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.tp-quiz-wrap--top {
  margin: 20px 0 26px;
  padding: 20px 22px 18px;
  border-width: 2px;
  border-top: 5px solid var(--tp-success);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.tp-quiz-wrap--top .tp-quiz-header {
  margin-bottom: 14px;
}

.tp-quiz-wrap--top .tp-quiz-header h2 {
  font-size: 21px;
}

.tp-quiz-wrap--mid {
  margin: 22px 0 28px;
  border-top: 5px solid var(--tp-blue);
}

.tp-direct-form {
  background: linear-gradient(180deg, #ffffff 0%, #f1f6fc 100%);
  border: 2px solid var(--tp-navy);
  border-top: 5px solid var(--tp-navy);
  border-radius: 12px;
  padding: 26px 26px 24px;
  margin: 30px 0;
  box-shadow: 0 8px 28px rgba(11, 45, 91, 0.11);
}

.tp-direct-form__badge {
  display: inline-block;
  background: var(--tp-success-bg);
  color: var(--tp-success);
  border: 1px solid var(--tp-success-border);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.tp-phone-locked {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 8px;
  align-items: stretch;
}

.tp-phone-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: var(--tp-blue-soft);
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--tp-navy);
  white-space: nowrap;
}

.tp-phone-prefix--ch {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.tp-archive-nav--ch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 780px) {
  .tp-quiz-wrap--top,
  .tp-direct-form {
    padding: 18px 16px;
  }
  .tp-phone-locked {
    grid-template-columns: 128px 1fr;
  }
  .tp-archive-nav--ch {
    grid-template-columns: 1fr;
  }
}
