/* =====================================================================
   TaviPay Design System
   Brand: #0ea5e9 (sky-500) primary, #0c4a6e deep-navy, #f59e0b accent
   ===================================================================== */

:root {
  --tp-primary: #0ea5e9;
  --tp-primary-600: #0284c7;
  --tp-primary-700: #0369a1;
  --tp-primary-900: #0c4a6e;
  --tp-cyan: #22d3ee;
  --tp-accent: #f59e0b;
  --tp-success: #10b981;
  --tp-ink: #0f172a;
  --tp-ink-2: #334155;
  --tp-muted: #64748b;
  --tp-line: #e2e8f0;
  --tp-bg: #ffffff;
  --tp-bg-2: #f8fafc;
  --tp-bg-3: #f1f5f9;

  --tp-radius: 14px;
  --tp-radius-lg: 22px;
  --tp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --tp-shadow: 0 8px 24px -8px rgba(2, 132, 199, .18), 0 4px 12px -4px rgba(15, 23, 42, .06);
  --tp-shadow-lg: 0 30px 60px -20px rgba(2, 132, 199, .25), 0 10px 25px -10px rgba(15, 23, 42, .12);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--tp-ink);
  background: var(--tp-bg);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, .display {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.025em;
  color: var(--tp-ink);
}

/* ---------- Containers ---------- */
.tp-container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .tp-container { padding: 0 2rem; } }

/* ---------- Buttons ---------- */
.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 10px; font-weight: 600; font-size: .95rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  white-space: nowrap;
}
.tp-btn:hover { transform: translateY(-1px); }
.tp-btn:active { transform: translateY(0); }

.tp-btn-primary {
  background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-primary-700) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(14, 165, 233, .55);
}
.tp-btn-primary:hover { box-shadow: 0 12px 28px -6px rgba(14, 165, 233, .65); }

.tp-btn-ghost {
  background: rgba(14, 165, 233, .08);
  color: var(--tp-primary-700);
}
.tp-btn-ghost:hover { background: rgba(14, 165, 233, .14); }

.tp-btn-outline {
  background: #fff; color: var(--tp-ink); border-color: var(--tp-line);
}
.tp-btn-outline:hover { border-color: var(--tp-primary); color: var(--tp-primary-700); }

.tp-btn-light {
  background: #fff; color: var(--tp-primary-700);
}
.tp-btn-light:hover { background: #f1f5f9; }

.tp-btn-lg { padding: 1rem 1.6rem; font-size: 1rem; border-radius: 12px; }

/* ---------- Launch announcement bar ---------- */
.tp-launch-bar {
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 50%, #0ea5e9 100%);
  color: #fff;
  font-size: .9rem;
  position: relative;
  overflow: hidden;
}
.tp-launch-bar::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(40% 100% at 90% 50%, rgba(34, 211, 238, .35) 0%, transparent 50%);
  pointer-events: none;
}
.tp-launch-bar-inner {
  display: flex; align-items: center; justify-content: center;
  gap: .65rem; flex-wrap: wrap;
  padding: .6rem 1rem;
  position: relative; z-index: 1;
  text-align: center;
}
.tp-launch-bar .flag {
  font-size: 1.05rem;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.2));
}
.tp-launch-bar strong { font-weight: 700; color: #fff; }
.tp-launch-bar .pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .15rem .55rem; margin-right: .3rem;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.tp-launch-bar .pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .25);
  animation: tp-pulse 2s ease-in-out infinite;
}
.tp-launch-bar a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .4);
  text-underline-offset: 3px;
  font-weight: 600;
  transition: text-decoration-color .15s;
}
.tp-launch-bar a:hover { text-decoration-color: #fff; }
@media (max-width: 640px) {
  .tp-launch-bar { font-size: .8rem; }
  .tp-launch-bar-inner { padding: .55rem .85rem; }
}

/* ---------- Header / Nav ---------- */
.tp-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, .8);
}
.tp-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.tp-nav-logo img { height: 36px; display: block; }
.tp-nav-links {
  display: none; align-items: center; gap: 2rem;
  font-weight: 500; font-size: .95rem; color: var(--tp-ink-2);
}
.tp-nav-links a { color: inherit; text-decoration: none; transition: color .15s; }
.tp-nav-links a:hover { color: var(--tp-primary-700); }
.tp-nav-actions { display: none; align-items: center; gap: .75rem; }

@media (min-width: 1024px) {
  .tp-nav-links, .tp-nav-actions { display: flex; }
}

/* Dropdown */
.tp-dropdown { position: relative; }
.tp-dropdown-trigger {
  display: inline-flex; align-items: center; gap: .25rem;
  background: none; border: none; cursor: pointer; color: inherit; font: inherit;
  padding: .5rem 0;
}
.tp-dropdown-trigger svg { transition: transform .2s; }
.tp-dropdown:hover .tp-dropdown-trigger svg { transform: rotate(180deg); }

.tp-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-4px);
  min-width: 480px;
  background: #fff;
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius-lg);
  box-shadow: var(--tp-shadow-lg);
  padding: 1rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: .25rem;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.tp-dropdown:hover .tp-dropdown-menu,
.tp-dropdown:focus-within .tp-dropdown-menu {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.tp-dropdown-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .75rem .85rem; border-radius: 10px;
  color: var(--tp-ink); text-decoration: none; transition: background .15s;
}
.tp-dropdown-item:hover { background: var(--tp-bg-2); color: var(--tp-primary-700); }
.tp-dropdown-icon {
  flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: var(--tp-primary-700);
  display: grid; place-items: center;
}
.tp-dropdown-title { font-weight: 600; font-size: .9rem; }
.tp-dropdown-desc { font-size: .8rem; color: var(--tp-muted); margin-top: 2px; line-height: 1.4; }

/* Mobile menu */
.tp-mobile-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--tp-bg-2); border: 1px solid var(--tp-line); cursor: pointer;
}
@media (min-width: 1024px) { .tp-mobile-toggle { display: none; } }

.tp-mobile-menu {
  display: none;
  border-top: 1px solid var(--tp-line);
  background: #fff;
  padding: 1rem 0 1.5rem;
}
.tp-mobile-menu.is-open { display: block; }
.tp-mobile-menu a {
  display: block; padding: .75rem 0; color: var(--tp-ink);
  text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--tp-bg-3);
}
.tp-mobile-menu a:hover { color: var(--tp-primary-700); }
.tp-mobile-menu .tp-mobile-section { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tp-muted); margin-top: 1rem; padding: .5rem 0; }
.tp-mobile-menu .tp-mobile-actions { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }

/* ---------- Hero ---------- */
.tp-hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 80% -10%, rgba(34, 211, 238, .15) 0%, transparent 60%),
    radial-gradient(60% 60% at 0% 0%, rgba(14, 165, 233, .12) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}
@media (min-width: 768px) { .tp-hero { padding: 7rem 0 6rem; } }

.tp-hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .tp-hero-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }

.tp-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .85rem; border-radius: 999px;
  background: rgba(14, 165, 233, .1);
  color: var(--tp-primary-700);
  font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  border: 1px solid rgba(14, 165, 233, .25);
}
.tp-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tp-success); animation: tp-pulse 2s ease-in-out infinite; }
@keyframes tp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

h1.tp-display {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05; font-weight: 800;
  margin: 1.25rem 0 1.25rem;
}
.tp-gradient-text {
  background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-primary-900) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tp-lead {
  font-size: 1.15rem; color: var(--tp-ink-2); max-width: 38rem;
}

.tp-hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.tp-hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid var(--tp-line);
}
.tp-stat-num { font-size: 1.75rem; font-weight: 800; color: var(--tp-primary-700); font-family: 'Plus Jakarta Sans', sans-serif; }
.tp-stat-label { font-size: .85rem; color: var(--tp-muted); margin-top: .25rem; }

/* Hero visual / mock app */
.tp-hero-visual {
  position: relative;
  perspective: 1200px;
}
.tp-app-mock {
  background: #fff;
  border-radius: var(--tp-radius-lg);
  border: 1px solid var(--tp-line);
  box-shadow: var(--tp-shadow-lg);
  overflow: hidden;
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform .4s ease;
}
.tp-app-mock:hover { transform: rotateY(0deg) rotateX(0deg); }
.tp-app-bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .85rem 1rem;
  background: var(--tp-bg-2);
  border-bottom: 1px solid var(--tp-line);
}
.tp-app-dot { width: 11px; height: 11px; border-radius: 50%; }
.tp-app-dot.r { background: #fb7185; }
.tp-app-dot.y { background: #fcd34d; }
.tp-app-dot.g { background: #34d399; }
.tp-app-url { margin-left: .75rem; font-size: .75rem; color: var(--tp-muted); font-family: ui-monospace, 'SF Mono', monospace; }

.tp-app-body { padding: 1.25rem; min-height: 360px; }
.tp-app-row { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-radius: 10px; }
.tp-app-row + .tp-app-row { margin-top: .35rem; }
.tp-app-row.alt { background: var(--tp-bg-2); }

.tp-mini-card {
  padding: 1rem; border-radius: 12px;
  border: 1px solid var(--tp-line); background: #fff;
}
.tp-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1rem; }
.tp-mini-label { font-size: .7rem; color: var(--tp-muted); text-transform: uppercase; letter-spacing: .08em; }
.tp-mini-val { font-size: 1.05rem; font-weight: 700; margin-top: .15rem; }

.tp-floating-badge {
  position: absolute; padding: .85rem 1rem;
  background: #fff; border-radius: 12px;
  box-shadow: var(--tp-shadow); border: 1px solid var(--tp-line);
  display: flex; align-items: center; gap: .65rem;
  font-size: .85rem; font-weight: 600;
}
.tp-floating-badge .icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; color: #fff;
}

/* ---------- Sections ---------- */
.tp-section { padding: 5rem 0; }
@media (min-width: 768px) { .tp-section { padding: 6rem 0; } }
.tp-section-tight { padding: 3rem 0; }
.tp-section-alt { background: var(--tp-bg-2); }

.tp-section-header { max-width: 720px; margin: 0 auto 3.5rem; text-align: center; }
.tp-section-header.left { text-align: left; margin: 0 0 3rem; }
.tp-section-eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700;
  color: var(--tp-primary-700); letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: .9rem;
}
h2.tp-section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  line-height: 1.15; font-weight: 800; margin-bottom: 1rem;
}
.tp-section-sub {
  font-size: 1.05rem; color: var(--tp-ink-2);
}

/* ---------- Trust bar ---------- */
.tp-trust {
  padding: 2.5rem 0;
  border-top: 1px solid var(--tp-line);
  border-bottom: 1px solid var(--tp-line);
  background: #fff;
}
.tp-trust-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
  align-items: center;
}
@media (min-width: 768px) { .tp-trust-grid { grid-template-columns: repeat(5, 1fr); } }
.tp-trust-item {
  display: flex; align-items: center; gap: .75rem;
  font-weight: 600; color: var(--tp-ink-2); font-size: .92rem;
  justify-content: center;
}
.tp-trust-item .badge {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: var(--tp-primary-700);
  display: grid; place-items: center; flex: none;
}

/* ---------- Feature grid ---------- */
.tp-feature-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .tp-feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tp-feature-grid { grid-template-columns: repeat(3, 1fr); } }

.tp-feature-card {
  background: #fff;
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius-lg);
  padding: 2rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.tp-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tp-shadow);
  border-color: rgba(14, 165, 233, .35);
}
.tp-feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-primary-700) 100%);
  color: #fff; margin-bottom: 1.25rem;
  box-shadow: 0 8px 16px -6px rgba(14, 165, 233, .5);
}
.tp-feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.tp-feature-card p { color: var(--tp-ink-2); font-size: .95rem; }
.tp-feature-link {
  margin-top: auto; padding-top: 1rem;
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--tp-primary-700); font-weight: 600; font-size: .9rem;
  text-decoration: none;
}
.tp-feature-link:hover { gap: .55rem; }

/* ---------- Module showcase (alternating rows) ---------- */
.tp-showcase-row {
  display: grid; gap: 3rem; align-items: center;
  padding: 4rem 0;
}
.tp-showcase-row + .tp-showcase-row { border-top: 1px solid var(--tp-line); }
@media (min-width: 1024px) { .tp-showcase-row { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.tp-showcase-row.reverse > .tp-showcase-visual { order: -1; }
@media (min-width: 1024px) {
  .tp-showcase-row.reverse > .tp-showcase-visual { order: 2; }
  .tp-showcase-row.reverse > .tp-showcase-content { order: 1; }
}

.tp-showcase-content h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; margin-bottom: 1rem;
}
.tp-showcase-content p { color: var(--tp-ink-2); font-size: 1.05rem; margin-bottom: 1.5rem; }
.tp-showcase-list { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.tp-showcase-list li {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .35rem 0; color: var(--tp-ink-2);
}
.tp-showcase-list li::before {
  content: ""; flex: none; margin-top: .45rem;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(16, 185, 129, .15);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 11px;
}

.tp-showcase-visual {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: var(--tp-radius-lg);
  padding: 2rem;
  border: 1px solid rgba(14, 165, 233, .15);
  position: relative;
}

/* ---------- Compliance bar ---------- */
.tp-compliance-band {
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 50%, #0369a1 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.tp-compliance-band::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(40% 40% at 90% 10%, rgba(34, 211, 238, .25) 0%, transparent 50%),
    radial-gradient(40% 40% at 10% 90%, rgba(14, 165, 233, .25) 0%, transparent 50%);
  pointer-events: none;
}
.tp-compliance-band .tp-section-title { color: #fff; }
.tp-compliance-band .tp-section-sub { color: rgba(186, 230, 253, .9); }
.tp-compliance-band .tp-section-eyebrow { color: #7dd3fc; }
.tp-compliance-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .tp-compliance-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .tp-compliance-grid { grid-template-columns: repeat(6, 1fr); } }
.tp-compliance-tile {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform .2s, background .2s;
}
.tp-compliance-tile:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .1); }
.tp-compliance-tile .name { font-weight: 700; font-size: 1.05rem; }
.tp-compliance-tile .desc { font-size: .78rem; color: rgba(186, 230, 253, .85); margin-top: .35rem; line-height: 1.4; }

/* ---------- Steps ---------- */
.tp-steps { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .tp-steps { grid-template-columns: repeat(3, 1fr); } }
.tp-step {
  background: #fff; border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius-lg);
  padding: 2rem; position: relative;
}
.tp-step-num {
  position: absolute; top: -18px; left: 1.5rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tp-primary), var(--tp-primary-700));
  color: #fff; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 6px 14px -4px rgba(14, 165, 233, .55);
}
.tp-step h3 { margin: .5rem 0 .65rem; font-weight: 700; font-size: 1.1rem; }
.tp-step p { color: var(--tp-ink-2); font-size: .95rem; }

/* ---------- Testimonial ---------- */
.tp-testimonial {
  background: #fff; border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius-lg);
  padding: 2.5rem; max-width: 820px; margin: 0 auto;
  box-shadow: var(--tp-shadow);
  position: relative;
}
.tp-testimonial::before {
  content: """; position: absolute; top: -.5rem; left: 1.25rem;
  font-size: 6rem; font-family: Georgia, serif; line-height: 1;
  color: rgba(14, 165, 233, .15);
}
.tp-testimonial blockquote {
  font-size: 1.2rem; font-weight: 500; line-height: 1.55; color: var(--tp-ink);
  margin: 0 0 1.25rem;
}
.tp-testimonial-author { display: flex; align-items: center; gap: .85rem; }
.tp-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tp-primary), var(--tp-primary-900));
  color: #fff; display: grid; place-items: center; font-weight: 700;
}

/* ---------- CTA Banner ---------- */
.tp-cta-banner {
  background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-primary-900) 100%);
  color: #fff;
  border-radius: var(--tp-radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  position: relative; overflow: hidden;
}
@media (min-width: 768px) { .tp-cta-banner { padding: 4rem 3rem; } }
.tp-cta-banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 70% at 70% 30%, rgba(34, 211, 238, .2) 0%, transparent 60%);
  pointer-events: none;
}
.tp-cta-banner h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: .75rem; }
.tp-cta-banner p { color: rgba(186, 230, 253, .92); font-size: 1.05rem; max-width: 540px; margin: 0 auto 1.75rem; }
.tp-cta-banner-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- Footer ---------- */
.tp-footer {
  background: #0b1220;
  color: #cbd5e1;
  padding: 4rem 0 2rem;
}
.tp-footer-grid {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .tp-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; } }
.tp-footer-brand p { color: #94a3b8; margin: 1rem 0 1.25rem; max-width: 320px; font-size: .92rem; }
.tp-footer-col h4 {
  color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 1rem; font-family: 'Inter', sans-serif; font-weight: 700;
}
.tp-footer-col ul { list-style: none; padding: 0; margin: 0; }
.tp-footer-col li { margin-bottom: .65rem; }
.tp-footer-col a { color: #cbd5e1; text-decoration: none; font-size: .92rem; transition: color .15s; }
.tp-footer-col a:hover { color: #38bdf8; }
.tp-footer-bottom {
  margin-top: 3rem; padding-top: 1.75rem;
  border-top: 1px solid #1e293b;
  display: flex; flex-direction: column; gap: 1rem;
  align-items: center; justify-content: space-between;
  font-size: .85rem; color: #64748b;
}
@media (min-width: 768px) { .tp-footer-bottom { flex-direction: row; } }
.tp-footer-social { display: flex; gap: .65rem; }
.tp-footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: #1e293b; display: grid; place-items: center; color: #94a3b8;
  transition: background .2s, color .2s;
}
.tp-footer-social a:hover { background: var(--tp-primary); color: #fff; }

/* ---------- Page header ---------- */
.tp-page-hero {
  padding: 5rem 0 3rem;
  background:
    radial-gradient(60% 60% at 90% 0%, rgba(34, 211, 238, .12) 0%, transparent 60%),
    linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--tp-line);
}
.tp-page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin: .75rem 0 1rem;
}
.tp-page-hero p { font-size: 1.1rem; color: var(--tp-ink-2); max-width: 640px; }

/* ---------- Breadcrumbs ---------- */
.tp-breadcrumb {
  display: flex; align-items: center; gap: .4rem;
  font-size: .85rem; color: var(--tp-muted);
}
.tp-breadcrumb a { color: var(--tp-muted); text-decoration: none; }
.tp-breadcrumb a:hover { color: var(--tp-primary-700); }
.tp-breadcrumb .sep { color: var(--tp-line); }

/* ---------- Forms ---------- */
.tp-form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tp-form-grid.two-col { grid-template-columns: 1fr 1fr; } }

.tp-field { display: flex; flex-direction: column; gap: .35rem; }
.tp-field label { font-size: .85rem; font-weight: 600; color: var(--tp-ink); }
.tp-field input, .tp-field select, .tp-field textarea {
  padding: .85rem 1rem; border-radius: 10px;
  border: 1px solid var(--tp-line); background: #fff;
  font: inherit; color: var(--tp-ink);
  transition: border-color .15s, box-shadow .15s;
}
.tp-field input:focus, .tp-field select:focus, .tp-field textarea:focus {
  outline: none; border-color: var(--tp-primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .14);
}
.tp-field-help { font-size: .8rem; color: var(--tp-muted); margin-top: .25rem; }

/* ---------- Card list ---------- */
.tp-card { background: #fff; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg); padding: 2rem; }

/* ---------- Tables ---------- */
.tp-table { width: 100%; border-collapse: collapse; }
.tp-table th, .tp-table td {
  padding: .85rem 1rem; text-align: left;
  border-bottom: 1px solid var(--tp-line);
}
.tp-table th { background: var(--tp-bg-2); font-weight: 600; font-size: .85rem; color: var(--tp-ink-2); text-transform: uppercase; letter-spacing: .04em; }
.tp-table tr:last-child td { border-bottom: none; }

/* ---------- Accordion / FAQ ---------- */
.tp-accordion { border-top: 1px solid var(--tp-line); }
.tp-accordion details {
  border-bottom: 1px solid var(--tp-line);
  padding: 1.25rem 0;
}
.tp-accordion summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-weight: 600; font-size: 1.05rem;
  color: var(--tp-ink);
}
.tp-accordion summary::-webkit-details-marker { display: none; }
.tp-accordion summary::after {
  content: "+"; font-size: 1.5rem; color: var(--tp-primary); font-weight: 300;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(14, 165, 233, .08);
  display: grid; place-items: center; flex: none;
  transition: transform .2s;
}
.tp-accordion details[open] summary::after { content: "−"; transform: rotate(180deg); }
.tp-accordion .answer { padding: 1rem 0 0; color: var(--tp-ink-2); line-height: 1.65; }

/* ---------- Tag / chip ---------- */
.tp-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 600; padding: .25rem .65rem;
  border-radius: 999px; background: rgba(14, 165, 233, .1); color: var(--tp-primary-700);
}
.tp-tag.success { background: rgba(16, 185, 129, .12); color: #047857; }
.tp-tag.amber { background: rgba(245, 158, 11, .12); color: #b45309; }
.tp-tag.slate { background: var(--tp-bg-3); color: var(--tp-ink-2); }

/* ---------- Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .tp-fade-in { animation: tp-fade-in .6s ease both; }
  @keyframes tp-fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
  .tp-fade-in.delay-1 { animation-delay: .1s; }
  .tp-fade-in.delay-2 { animation-delay: .2s; }
  .tp-fade-in.delay-3 { animation-delay: .3s; }
}

/* ---------- Utility ---------- */
.tp-grid-2 { display: grid; gap: 2rem; }
@media (min-width: 768px) { .tp-grid-2 { grid-template-columns: 1fr 1fr; } }
.tp-grid-3 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .tp-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.tp-mt-0 { margin-top: 0; }
.tp-text-center { text-align: center; }
.tp-mw-prose { max-width: 70ch; }

.tp-hr { border: 0; border-top: 1px solid var(--tp-line); margin: 2.5rem 0; }

/* ============================================================================
   Workflow Flowchart (How It Works page)
   Light-mode rebuild of the dark workflow diagram, matching site palette.
   Fixed 1800px wide internally; wrapped in a horizontally-scrollable container.
   ============================================================================ */
.tp-flowchart-mobile-hint {
  display: none;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 auto 0.75rem;
  padding: 0.5rem 0.85rem;
  background: var(--tp-bg-2);
  color: var(--tp-muted);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  width: max-content;
  max-width: 90%;
}
@media (max-width: 1820px) {
  .tp-flowchart-mobile-hint { display: inline-flex; }
}
.tp-flowchart-mobile-hint svg { animation: tp-fc-arrow-pulse 1.4s ease-in-out infinite; }
@keyframes tp-fc-arrow-pulse {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50% { transform: translateX(4px); opacity: 1; }
}

.tp-flowchart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--tp-primary) var(--tp-line);
  scrollbar-width: thin;
}
.tp-flowchart-scroll::-webkit-scrollbar { height: 10px; }
.tp-flowchart-scroll::-webkit-scrollbar-track { background: var(--tp-line); border-radius: 5px; }
.tp-flowchart-scroll::-webkit-scrollbar-thumb { background: var(--tp-primary); border-radius: 5px; }

.tp-flowchart {
  width: 1800px;
  min-height: 1310px;
  position: relative;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at 15% 8%, rgba(14, 165, 233, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(14, 165, 233, 0.03) 0%, transparent 55%),
    var(--tp-bg);
  border: 1px solid var(--tp-line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 32px -12px rgba(2, 132, 199, 0.15);
  font-family: 'Inter', system-ui, sans-serif;
}
.tp-flowchart::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(14, 165, 233, 0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  border-radius: 16px;
}

/* Logo */
.tp-fc-logo {
  position: absolute; top: 16px; left: 18px;
  display: flex; align-items: center; gap: 10px;
}
.tp-fc-logo-name {
  font-size: 24px; font-weight: 800;
  color: var(--tp-primary-700);
  line-height: 1;
}
.tp-fc-logo-tag {
  font-size: 9px; font-weight: 600;
  color: var(--tp-muted);
  letter-spacing: 2.5px; text-transform: uppercase; margin-top: 3px;
}

/* Chart title */
.tp-fc-title {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  text-align: center;
}
.tp-fc-title h3 {
  font-size: 17px; font-weight: 800;
  color: var(--tp-text, #0f172a);
  letter-spacing: 0.3px;
  margin: 0;
}
.tp-fc-title .sub {
  font-size: 10px; font-weight: 600;
  color: var(--tp-muted);
  letter-spacing: 1.8px; text-transform: uppercase; margin-top: 4px;
}

/* FRCS badge */
.tp-fc-frcs {
  position: absolute; top: 16px; right: 18px;
  background: linear-gradient(135deg, var(--tp-primary), var(--tp-primary-700));
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 8px;
  padding: 7px 16px;
  box-shadow: 0 4px 14px -4px rgba(14, 165, 233, 0.4);
}
.tp-fc-frcs .line1 { font-size: 10px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }
.tp-fc-frcs .line2 { font-size: 8px; color: #bae6fd; margin-top: 2px; text-align: center; }

/* Zone labels */
.tp-fc-zlb {
  position: absolute;
  font-size: 8px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.4px;
  padding: 4px 11px;
  border-radius: 999px;
}

/* Zone glow bands */
.tp-fc-zb {
  position: absolute;
  border-radius: 16px;
  pointer-events: none;
}

/* Boxes */
.tp-fc-box {
  position: absolute;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tp-line);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.08);
}
.tp-fc-box.s  { border-color: rgba(14, 165, 233, 0.35); box-shadow: 0 2px 12px -4px rgba(14, 165, 233, 0.15); }
.tp-fc-box.e  { border-color: rgba(2, 132, 199, 0.35); box-shadow: 0 2px 12px -4px rgba(2, 132, 199, 0.15); }
.tp-fc-box.p  { border-color: rgba(148, 163, 184, 0.45); }
.tp-fc-box.pr { border-color: rgba(99, 102, 241, 0.4); box-shadow: 0 2px 14px -4px rgba(99, 102, 241, 0.2); }
.tp-fc-box.c  { border-color: rgba(220, 38, 38, 0.3); box-shadow: 0 2px 12px -4px rgba(220, 38, 38, 0.12); }
.tp-fc-box.o  { border-color: rgba(124, 58, 237, 0.3); box-shadow: 0 2px 12px -4px rgba(124, 58, 237, 0.12); }
.tp-fc-box.r  { border-color: rgba(217, 119, 6, 0.3); box-shadow: 0 2px 12px -4px rgba(217, 119, 6, 0.12); }
.tp-fc-box.es { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 2px 12px -4px rgba(16, 185, 129, 0.16); }

/* Box header gradients */
.tp-fc-box .bh {
  padding: 6px 9px 5px;
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: #fff; line-height: 1.2;
}
.tp-fc-box.s  .bh { background: linear-gradient(135deg, var(--tp-primary), var(--tp-primary-700)); }
.tp-fc-box.e  .bh { background: linear-gradient(135deg, var(--tp-primary-600), var(--tp-primary-900)); }
.tp-fc-box.p  .bh { background: linear-gradient(135deg, #64748b, #334155); }
.tp-fc-box.pr .bh { background: linear-gradient(135deg, #6366f1, #3730a3); }
.tp-fc-box.pr .bh.locked { background: linear-gradient(135deg, #475569, #1e293b); }
.tp-fc-box.c  .bh { background: linear-gradient(135deg, #dc2626, #9f1239); }
.tp-fc-box.o  .bh { background: linear-gradient(135deg, #7c3aed, #4c1d95); }
.tp-fc-box.r  .bh { background: linear-gradient(135deg, #d97706, #92400e); }
.tp-fc-box.es .bh { background: linear-gradient(135deg, #10b981, #065f46); }

/* Box body */
.tp-fc-box .bd {
  font-size: 9px;
  color: var(--tp-text, #334155);
  padding: 7px 9px 8px;
  line-height: 1.5;
}

/* Bubble (annotation/note) */
.tp-fc-bubble {
  position: absolute;
  background: #fef3c7;
  border: 1.5px dashed #f59e0b;
  border-radius: 50% / 40%;
  padding: 8px 11px;
  font-size: 8.5px;
  color: #78350f;
  line-height: 1.5;
  text-align: center;
  font-style: italic;
}
.tp-fc-bubble strong {
  color: #92400e;
  font-style: normal;
  display: block;
  margin-bottom: 2px;
  font-weight: 800;
}

/* Other Docs panel */
.tp-fc-odoc { position: absolute; }
.tp-fc-odoc-t {
  background: linear-gradient(135deg, var(--tp-primary-700), var(--tp-primary-900));
  color: #fff;
  text-align: center;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 7px 0;
  border-radius: 8px 8px 0 0;
}
.tp-fc-odoc-i {
  background: #fff;
  border: 1px solid var(--tp-line);
  border-top: none;
  padding: 7px 10px;
  font-size: 9px; font-weight: 600;
  color: var(--tp-text, #475569);
  text-align: center;
}
.tp-fc-odoc-i:last-child { border-radius: 0 0 8px 8px; }

/* Footer */
.tp-fc-foot {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--tp-muted);
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.tp-fc-vtag {
  position: absolute; bottom: 10px; right: 18px;
  font-size: 9px; color: var(--tp-muted);
}

/* ============================================================================
   AI Chat Widget — "Ask Zavy"
   Floating button bottom-right + expandable panel
   ============================================================================ */
#tp-chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; font-family: var(--tp-font-body, 'Inter', system-ui, sans-serif); }

#tp-chat-toggle {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #0c4a6e);
  color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(14, 165, 233, 0.5), 0 4px 12px -2px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}
#tp-chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -6px rgba(14, 165, 233, 0.6), 0 6px 16px -2px rgba(0, 0, 0, 0.2); }
#tp-chat-toggle:active { transform: translateY(0); }
#tp-chat-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.tp-chat-toggle-pulse {
  position: absolute; top: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #10b981; border: 2px solid #fff;
  animation: tp-chat-pulse 2s ease-out infinite;
}
@keyframes tp-chat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

#tp-chat-panel {
  position: absolute; bottom: 72px; right: 0;
  width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(2, 132, 199, 0.35), 0 12px 32px -8px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(14, 165, 233, 0.15);
  display: flex; flex-direction: column;
  animation: tp-chat-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
/* CRITICAL: override CSS specificity that would otherwise show the panel
   when JS sets the [hidden] HTML attribute. Without this, panel.hidden = true
   does nothing because #tp-chat-panel display:flex wins. */
#tp-chat-panel[hidden] { display: none !important; }
@keyframes tp-chat-slide-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tp-chat-header {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #fff;
}
.tp-chat-header-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid; place-items: center; flex-shrink: 0;
}
.tp-chat-header-meta { flex: 1; min-width: 0; }
.tp-chat-header-name { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.tp-chat-header-status { font-size: 0.7rem; opacity: 0.85; margin-top: 0.1rem; display: flex; align-items: center; gap: 0.35rem; }
.tp-chat-header-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.7); }
.tp-chat-header-clear {
  background: rgba(255, 255, 255, 0.12); border: none; color: #fff; cursor: pointer;
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  transition: background 0.15s;
}
.tp-chat-header-clear:hover { background: rgba(255, 255, 255, 0.22); }

.tp-chat-messages {
  flex: 1; overflow-y: auto;
  padding: 1rem; background: #f8fafc;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.tp-chat-msg { display: flex; }
.tp-chat-msg-user { justify-content: flex-end; }
.tp-chat-msg-assistant { justify-content: flex-start; }
.tp-chat-msg-error { justify-content: flex-start; }

.tp-chat-bubble {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  font-size: 0.88rem; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word;
}
.tp-chat-msg-user .tp-chat-bubble {
  background: linear-gradient(135deg, #0ea5e9, #0369a1); color: #fff;
  border-bottom-right-radius: 4px;
}
.tp-chat-msg-assistant .tp-chat-bubble {
  background: #fff; color: var(--tp-text, #0f172a);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-bottom-left-radius: 4px;
}
.tp-chat-msg-error .tp-chat-bubble {
  background: #fef3c7; color: #78350f;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-bottom-left-radius: 4px;
}
.tp-chat-msg-error a { color: #b45309; text-decoration: underline; font-weight: 600; }

/* Typing indicator */
.tp-chat-typing .tp-chat-bubble { display: inline-flex; gap: 4px; padding: 0.85rem 1rem; align-items: center; }
.tp-typing-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #94a3b8;
  animation: tp-typing-bounce 1.2s ease-in-out infinite;
}
.tp-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.tp-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes tp-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Suggestion chips */
.tp-chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0 1rem 0.75rem;
  background: #f8fafc;
}
.tp-chat-suggestion {
  font: inherit;
  padding: 0.4rem 0.75rem;
  background: #fff; color: var(--tp-primary-700, #0369a1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.tp-chat-suggestion:hover { background: #f0f9ff; border-color: rgba(14, 165, 233, 0.5); }

/* Input row */
.tp-chat-input-row {
  display: flex; align-items: flex-end; gap: 0.5rem;
  padding: 0.75rem;
  background: #fff;
  border-top: 1px solid rgba(14, 165, 233, 0.12);
}
#tp-chat-input {
  flex: 1; resize: none;
  font: inherit; font-size: 0.88rem; line-height: 1.4;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4); border-radius: 10px;
  background: #f8fafc;
  min-height: 36px; max-height: 120px;
  color: var(--tp-text, #0f172a);
}
#tp-chat-input:focus { outline: none; border-color: #0ea5e9; background: #fff; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12); }
#tp-chat-send {
  width: 36px; height: 36px; flex-shrink: 0;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #fff; border: none; border-radius: 10px;
  cursor: pointer; display: grid; place-items: center;
  transition: transform 0.15s, opacity 0.15s;
}
#tp-chat-send:hover:not(:disabled) { transform: translateY(-1px); }
#tp-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

.tp-chat-footer {
  padding: 0.5rem 1rem;
  background: #fff;
  border-top: 1px solid rgba(14, 165, 233, 0.08);
  font-size: 0.7rem; color: var(--tp-muted, #64748b);
  text-align: center;
}
.tp-chat-footer a { color: var(--tp-primary-700, #0369a1); font-weight: 600; text-decoration: none; }
.tp-chat-footer a:hover { text-decoration: underline; }

/* Mobile responsive — full-screen panel on small screens */
@media (max-width: 480px) {
  #tp-chat-widget { bottom: 16px; right: 16px; }
  #tp-chat-panel {
    position: fixed; bottom: 80px; right: 16px; left: 16px;
    width: auto; height: calc(100vh - 100px);
  }
}
