:root {
  --ts-ink: #172033;
  --ts-muted: #5f6878;
  --ts-canvas: #fbfaf7;
  --ts-surface: #ffffff;
  --ts-line: #e7e4dd;
  --ts-primary: #5b5bd6;
  --ts-primary-dark: #4545b8;
  --ts-primary-soft: #eeeeff;
  --ts-mint: #18a77a;
  --ts-mint-soft: #e8f8f1;
  --ts-warm: #f4b860;
  --ts-danger: #b4233f;
  --ts-radius-sm: 0.75rem;
  --ts-radius: 1.25rem;
  --ts-radius-lg: 1.75rem;
  --ts-shadow-sm: 0 1px 2px rgba(23, 32, 51, 0.04), 0 8px 24px rgba(23, 32, 51, 0.06);
  --ts-shadow: 0 18px 50px -24px rgba(40, 43, 86, 0.3);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background: var(--ts-canvas);
  color: var(--ts-ink);
  font-family: "Work Sans", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  color: var(--ts-ink);
  font-family: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a,
button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

a,
button {
  transition-duration: 180ms;
  transition-property: color, background-color, border-color, box-shadow, opacity, transform;
  transition-timing-function: ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(91, 91, 214, 0.42) !important;
  outline-offset: 3px !important;
}

button,
input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 44px;
}

.skip-link {
  background: var(--ts-ink);
  border-radius: 0 0 0.65rem 0.65rem;
  color: #fff;
  font-weight: 700;
  left: 1rem;
  padding: 0.7rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

.site-header {
  background: rgba(251, 250, 247, 0.9) !important;
  border-color: rgba(220, 216, 207, 0.88) !important;
  box-shadow: 0 1px 0 rgba(23, 32, 51, 0.02);
  backdrop-filter: blur(18px);
}

.site-nav {
  max-width: 80rem;
}

.site-logo {
  display: block;
  height: 2.35rem !important;
  max-width: 10rem;
  object-fit: contain;
  width: auto !important;
}

.site-nav-links {
  gap: 1.65rem !important;
}

.site-nav-links > a:not([class*="bg-"]) {
  color: #4b5565 !important;
  font-weight: 550;
}

.site-nav-links > a:not([class*="bg-"]):hover,
.site-nav-links > a:not([class*="bg-"])[aria-current="page"] {
  color: var(--ts-primary-dark) !important;
}

.site-nav-links > a[class*="bg-"] {
  border-radius: 999px !important;
  box-shadow: 0 8px 18px -10px rgba(69, 69, 184, 0.75);
  font-weight: 650;
}

.site-menu-button {
  align-items: center;
  border: 1px solid var(--ts-line);
  border-radius: 0.75rem;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

.site-menu-button:hover {
  background: var(--ts-primary-soft);
  border-color: #c9c8f8;
}

.site-mobile-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--ts-line) !important;
  border-radius: 0 0 1rem 1rem;
  box-shadow: var(--ts-shadow-sm);
}

.site-mobile-menu a {
  min-height: 44px;
}

.site-footer {
  background: #172033 !important;
  color: #cbd2df !important;
}

.site-footer h3 {
  color: #fff;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer img {
  height: 2.5rem !important;
  width: auto !important;
}

.ts-page {
  background:
    radial-gradient(circle at 12% 5%, rgba(244, 184, 96, 0.15), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(91, 91, 214, 0.12), transparent 28rem),
    linear-gradient(180deg, #fff 0%, var(--ts-canvas) 100%) !important;
}

.ts-page-header {
  margin-inline: auto;
  max-width: 48rem;
  text-align: center;
}

.ts-eyebrow {
  align-items: center;
  background: var(--ts-primary-soft);
  border: 1px solid #d9d8ff;
  border-radius: 999px;
  color: var(--ts-primary-dark);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.45rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.8rem;
  text-transform: uppercase;
}

.ts-card,
.ts-feature-grid > div,
.ts-faq > div,
.ts-doc-section,
.campaign-card,
.profile-card,
.ts-auth-card {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid var(--ts-line) !important;
  border-radius: var(--ts-radius) !important;
  box-shadow: var(--ts-shadow-sm) !important;
}

.ts-card,
.ts-feature-grid > div,
.ts-faq > div,
.ts-doc-section {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.ts-feature-grid > div,
.campaign-card {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ts-feature-grid > div:hover,
.campaign-card:hover {
  border-color: #cecdf5 !important;
  box-shadow: var(--ts-shadow) !important;
  transform: translateY(-3px);
}

.ts-steps > div {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--ts-line);
  border-radius: var(--ts-radius);
  box-shadow: var(--ts-shadow-sm);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.ts-callout {
  background: linear-gradient(135deg, #f1f0ff, #edfbf5) !important;
  border: 1px solid #dcdaf7;
  border-radius: var(--ts-radius-lg) !important;
  box-shadow: var(--ts-shadow-sm);
}

.ts-notice {
  background: #fff9eb;
  border: 1px solid #eed9a8;
  border-radius: var(--ts-radius-sm);
  color: #654d19;
  padding: 1rem 1.1rem;
}

.ts-notice strong {
  color: #44320b;
}

.ts-hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(24, 167, 122, 0.14), transparent 24rem),
    radial-gradient(circle at 10% 10%, rgba(244, 184, 96, 0.2), transparent 28rem),
    linear-gradient(145deg, #fffdf8 0%, #f4f3ff 52%, #f0fbf7 100%) !important;
}

.ts-hero h1 {
  font-size: clamp(2.65rem, 6vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.ts-hero-image {
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 30px 80px -35px rgba(34, 53, 68, 0.55) !important;
}

.ts-button-primary,
.ts-cta {
  align-items: center;
  background: linear-gradient(135deg, var(--ts-primary), #7867db) !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  box-shadow: 0 12px 24px -14px rgba(69, 69, 184, 0.85);
  color: #fff !important;
  display: inline-flex;
  font-weight: 700 !important;
  justify-content: center;
  min-height: 46px;
}

.ts-button-primary:hover,
.ts-cta:hover {
  box-shadow: 0 16px 30px -15px rgba(69, 69, 184, 0.9);
  transform: translateY(-1px);
}

.ts-button-secondary {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: #d8d5ce !important;
  border-radius: 999px !important;
  color: var(--ts-ink) !important;
  font-weight: 650 !important;
}

.ts-prose {
  color: var(--ts-muted);
}

.ts-prose h2 {
  margin-top: 2.5rem;
}

.ts-prose h2:first-child {
  margin-top: 0;
}

.ts-prose a {
  color: var(--ts-primary-dark);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

.ts-prose ul {
  list-style: disc;
  padding-left: 1.3rem;
}

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

.ts-check-list li {
  padding-left: 1.75rem;
  position: relative;
}

.ts-check-list li::before {
  color: var(--ts-mint);
  content: "✓";
  font-weight: 800;
  left: 0;
  position: absolute;
}

.ts-doc-section {
  border-left: 1px solid var(--ts-line) !important;
}

.ts-doc-section > h2::before {
  background: var(--ts-primary);
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 0.7rem;
  margin-right: 0.65rem;
  width: 0.7rem;
}

.ts-auth-card {
  box-shadow: var(--ts-shadow) !important;
}

.ts-auth-card input {
  background: #fff;
  border-color: #d9d7d0 !important;
  border-radius: 0.85rem !important;
}

.ts-auth-card input:hover {
  border-color: #b8b5ac !important;
}

.profile-main {
  background:
    radial-gradient(circle at 10% 0%, rgba(91, 91, 214, 0.13), transparent 28rem),
    linear-gradient(180deg, #f7f6ff, var(--ts-canvas)) !important;
  color: var(--ts-ink) !important;
}

.profile-hero {
  background: linear-gradient(135deg, #4e4ec4, #6959c9 52%, #188b70) !important;
}

.profile-card {
  color: var(--ts-ink) !important;
  padding: clamp(1.1rem, 3vw, 1.65rem) !important;
}

.profile-card .text-white,
.profile-card h2,
.profile-card h3,
.profile-card p.text-lg {
  color: var(--ts-ink) !important;
}

.profile-card .text-slate-300,
.profile-card .text-slate-400,
.profile-card .text-slate-500 {
  color: var(--ts-muted) !important;
}

.profile-card .border-slate-600,
.profile-card .border-slate-500 {
  border-color: var(--ts-line) !important;
}

.profile-card input,
.profile-card textarea {
  background: #fff !important;
  border-color: #d9d7d0 !important;
  color: var(--ts-ink) !important;
}

.profile-card a.border-slate-600:hover {
  background: #f5f4ff !important;
}

.profile-card .text-blue-300,
.profile-card .text-blue-400 {
  color: #4141b7 !important;
}

.profile-card .text-green-400 {
  color: #087c5a !important;
}

.profile-card .text-purple-400 {
  color: #6b46c1 !important;
}

.profile-card .text-orange-400 {
  color: #b45309 !important;
}

.profile-card .text-red-300 {
  color: #be123c !important;
}

.profile-card .text-red-300:hover {
  color: #8f1630 !important;
}

.profile-card a[class*="bg-blue-"],
.profile-card a[class*="bg-green-"],
.profile-card a[class*="bg-purple-"],
.profile-card button[class*="bg-blue-"],
.profile-card span[class*="bg-green-"],
.profile-card span[class*="bg-red-"] {
  color: #fff !important;
}

.campaign-skeleton {
  animation: ts-pulse 1.5s ease-in-out infinite;
  background: linear-gradient(90deg, #efede8 25%, #f8f7f3 50%, #efede8 75%);
  background-size: 200% 100%;
}

.error-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(244, 184, 96, 0.2), transparent 28rem),
    radial-gradient(circle at 85% 18%, rgba(91, 91, 214, 0.16), transparent 30rem),
    var(--ts-canvas);
  min-height: 100vh;
}

.error-header {
  border-bottom: 1px solid var(--ts-line);
  padding: 1rem clamp(1rem, 4vw, 2rem);
}

.error-header-inner,
.error-main,
.error-footer-inner {
  margin-inline: auto;
  max-width: 72rem;
}

.error-header-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.error-header a {
  color: var(--ts-primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.error-header a:not(:first-child) {
  padding: 0.55rem 0.75rem;
}

.error-main {
  align-items: center;
  display: grid;
  min-height: calc(100vh - 13rem);
  padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 4vw, 2rem);
}

.error-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--ts-line);
  border-radius: var(--ts-radius-lg);
  box-shadow: var(--ts-shadow);
  max-width: 48rem;
  padding: clamp(1.5rem, 6vw, 4rem);
}

.error-code {
  color: var(--ts-primary-dark);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.error-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1;
  margin: 1rem 0 1.25rem;
}

.error-copy {
  color: var(--ts-muted);
  font-size: 1.1rem;
  max-width: 38rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.error-actions a {
  border: 1px solid #d8d5ce;
  border-radius: 999px;
  color: var(--ts-ink);
  font-weight: 700;
  padding: 0.75rem 1.1rem;
  text-decoration: none;
}

.error-actions a:first-child {
  background: linear-gradient(135deg, var(--ts-primary), #7867db);
  border-color: transparent;
  color: #fff;
}

.error-footer {
  border-top: 1px solid var(--ts-line);
  color: var(--ts-muted);
  font-size: 0.9rem;
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
}

@keyframes ts-pulse {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (max-width: 1100px) {
  .site-nav-links {
    gap: 0.8rem !important;
    font-size: 0.9rem;
  }
}

@media (max-width: 1023px) {
  .site-mobile-menu {
    left: 1rem;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    position: absolute;
    right: 1rem;
  }
}

@media (max-width: 767px) {

  .ts-hero h1 {
    line-height: 1.02;
  }

  .ts-steps > div,
  .profile-identity,
  .profile-section-heading {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .profile-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ts-line: #7b7b7b;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline-color: #000 !important;
  }
}
