:root {
  --bg: #ffffff;
  --text: #121317;
  --muted: #121317;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --dark: #121317;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

a {
  color: inherit;
}

.ts-wrap {
  width: min(1240px, 92vw);
  margin-inline: auto;
}

.ts-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.ts-nav-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 38px;
}

.ts-brand {
  text-decoration: none;
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.ts-nav {
  display: flex;
  gap: 30px;
}

.ts-nav ul,
.ts-nav .ts-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 30px;
}

.ts-nav li {
  margin: 0;
}

.ts-nav a {
  text-decoration: none;
  color: #121317;
  font-weight: 500;
}

.ts-main {
  min-height: calc(100vh - 170px);
}

.ts-hero {
  min-height: calc(100vh - 73px);
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ts-hero-inner {
  width: min(1840px, 100%);
  padding: 56px 24px;
}

.ts-hero-title {
  font-size: clamp(2.2rem, 7vw, 7.2rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 0;
  max-width: 22ch;
  min-height: 2.2em;
  margin-inline: auto;
}

.ts-typed {
  white-space: pre-wrap;
}

.ts-cursor {
  color: #2563eb;
  animation: ts-blink 1s step-end infinite;
}

.ts-cursor.is-hidden {
  display: none;
}

.ts-hero-sub {
  margin: 22px auto 0;
  max-width: 58ch;
  color: var(--muted);
}

.ts-hero-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .55s ease, transform .55s ease;
}

.ts-hero-actions.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ts-home-news {
  padding: 0 0 90px;
}

.ts-home-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.ts-home-news-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.ts-home-news-empty {
  max-width: 760px;
}

.ts-home-latest-wrap {
  opacity: 0;
  transform: scale(.74);
  transform-origin: center top;
  will-change: transform, opacity;
}

.ts-home-latest-card {
  max-width: 1040px;
  margin: 0 auto;
}

.ts-home-latest-card .ts-news-image-wrap {
  aspect-ratio: 16 / 9;
}

.ts-home-latest-card .ts-news-body {
  padding: 18px 18px 20px;
}

.ts-home-latest-card .ts-news-title {
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  margin-bottom: 12px;
}

.ts-home-latest-card .ts-news-meta {
  font-size: .92rem;
}

.ts-tools-banner {
  margin-top: 34px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ts-tools-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  min-width: 100%;
  padding: 6px 0 10px;
}

.ts-tool-badge {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  flex: 0 0 auto;
  animation: ts-wave-flow 3.6s linear infinite;
}

.ts-tool-badge:nth-child(1) { animation-delay: -0.00s; }
.ts-tool-badge:nth-child(2) { animation-delay: -0.15s; }
.ts-tool-badge:nth-child(3) { animation-delay: -0.30s; }
.ts-tool-badge:nth-child(4) { animation-delay: -0.45s; }
.ts-tool-badge:nth-child(5) { animation-delay: -0.60s; }
.ts-tool-badge:nth-child(6) { animation-delay: -0.75s; }
.ts-tool-badge:nth-child(7) { animation-delay: -0.90s; }
.ts-tool-badge:nth-child(8) { animation-delay: -1.05s; }
.ts-tool-badge:nth-child(9) { animation-delay: -1.20s; }
.ts-tool-badge:nth-child(10) { animation-delay: -1.35s; }
.ts-tool-badge:nth-child(11) { animation-delay: -1.50s; }
.ts-tool-badge:nth-child(12) { animation-delay: -1.65s; }
.ts-tool-badge:nth-child(13) { animation-delay: -1.80s; }
.ts-tool-badge:nth-child(14) { animation-delay: -1.95s; }
.ts-tool-badge:nth-child(15) { animation-delay: -2.10s; }
.ts-tool-badge:nth-child(16) { animation-delay: -2.25s; }
.ts-tool-badge:nth-child(17) { animation-delay: -2.40s; }
.ts-tool-badge:nth-child(18) { animation-delay: -2.55s; }

@keyframes ts-wave-flow {
  0% {
    transform: translate3d(0, -3px, 0);
  }
  25% {
    transform: translate3d(0, 1px, 0);
  }
  50% {
    transform: translate3d(0, 5px, 0);
  }
  75% {
    transform: translate3d(0, 1px, 0);
  }
  100% {
    transform: translate3d(0, -3px, 0);
  }
}

.ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}

.ts-btn-dark {
  background: #121317;
  color: #fff;
}

.ts-btn-light {
  background: #f8f8fb;
  color: #000;
  border-color: #e7e8ee;
}

.ts-page {
  padding: 48px 0 72px;
}

.ts-post-wrap {
  max-width: 980px;
}

.ts-post {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 38px);
}

.ts-post-header {
  margin-bottom: 20px;
}

.ts-post-title {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.ts-post-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ts-post-meta span + span::before {
  content: '•';
  margin-right: 10px;
  color: #94a3b8;
}

.ts-post-content {
  font-size: 1.05rem;
  line-height: 1.82;
}

.ts-post-featured {
  margin: 0 0 22px;
}

.ts-post-featured-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.ts-post-content > *:first-child {
  margin-top: 0;
}

.ts-post-content > *:last-child {
  margin-bottom: 0;
}

.ts-post-content h2,
.ts-post-content h3,
.ts-post-content h4 {
  margin: 2.1em 0 .65em;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.ts-post-content p,
.ts-post-content ul,
.ts-post-content ol,
.ts-post-content blockquote,
.ts-post-content pre,
.ts-post-content figure {
  margin: 0 0 1.15em;
}

.ts-post-content a {
  color: #1d4ed8;
}

.ts-post-content img {
  height: auto;
  max-width: 100%;
  border-radius: 12px;
}

.ts-post-content blockquote {
  border-left: 3px solid #cbd5e1;
  margin-left: 0;
  padding-left: 14px;
  color: #334155;
}

.ts-read-more {
  margin-top: 42px;
}

.ts-read-more-title {
  margin: 0 0 16px;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  letter-spacing: -0.02em;
}

.ts-read-more-grid {
  gap: 18px;
}

.ts-section-head {
  margin-bottom: 26px;
}

.ts-section-head h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.ts-section-head p {
  margin: 0;
  color: var(--muted);
}

.ts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ts-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ts-news-card {
  background: #07090d;
  border: 1px solid #171b22;
  border-radius: 14px;
  overflow: hidden;
}

.ts-news-image-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  background: #121317;
}

.ts-news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ts-news-image-fallback {
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
}

.ts-news-body {
  padding: 14px 14px 16px;
}

.ts-news-title {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.ts-news-title a {
  color: #f8fafc;
  text-decoration: none;
}

.ts-news-meta {
  margin: 0;
  color: #b6bfce;
  font-size: .84rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ts-news-meta span + span::before {
  content: '•';
  margin-right: 10px;
  color: #94a3b8;
}

.ts-news-bottom {
  margin-top: 64px;
  background: #ffffff;
  border-top: 1px solid #e1e4ea;
  padding: 48px 0 0;
  overflow: hidden;
}

.ts-news-bottom-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 24px;
}

.ts-news-bottom-links {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.ts-news-bottom-links a {
  text-decoration: none;
  color: #121317;
  font-size: 1rem;
}

.ts-news-bottom-links a:hover {
  text-decoration: underline;
}

.ts-news-bottom-brand {
  margin: 28px 0 -24px;
  font-size: clamp(3rem, 17vw, 15rem);
  line-height: .88;
  letter-spacing: -0.05em;
  color: #070b14;
  font-weight: 700;
}

.ts-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 20px;
}

.ts-card-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.ts-card-title a {
  text-decoration: none;
}

.ts-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .86rem;
}

.ts-card-content {
  margin: 0;
  color: #121317;
  line-height: 1.65;
}

.ts-tag {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .72rem;
  margin-bottom: 10px;
  color: #121317;
}

.ts-inline-link {
  display: inline-block;
  margin-top: 14px;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.ts-pagination {
  grid-column: 1 / -1;
  margin-top: 14px;
}

.ts-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-right: 6px;
  text-decoration: none;
  color: #121317;
}

.ts-pagination .current {
  background: #121317;
  color: #fff;
  border-color: #121317;
}

.ts-coupon {
  margin: 12px 0 16px;
  color: #121317;
}

.ts-about-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ts-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  font-size: .92rem;
}

.ts-code-trail-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.ts-custom-cursor-enabled,
.ts-custom-cursor-enabled * {
  cursor: none !important;
}

.ts-code-trail-core {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .95);
  box-shadow: 0 0 18px rgba(37, 99, 235, .8);
  transform: translate3d(-50px, -50px, 0);
}

.ts-code-trail-bit {
  position: absolute;
  transform: translate3d(-40px, -40px, 0);
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 15px;
  font-weight: 700;
  color: rgba(37, 99, 235, .95);
  text-shadow: 0 0 12px rgba(37, 99, 235, .35);
  white-space: nowrap;
  will-change: transform, opacity;
}

@keyframes ts-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (max-width: 980px) {
  .ts-grid,
  .ts-about-layout,
  .ts-news-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ts-news-bottom-top {
    flex-direction: column;
  }

  .ts-home-news-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ts-tool-badge {
    width: 66px;
    height: 66px;
    font-size: .68rem;
  }
}

@media (max-width: 680px) {
  .ts-nav-row {
    min-height: 64px;
    gap: 14px;
  }

  .ts-brand {
    font-size: 1.45rem;
  }

  .ts-nav {
    gap: 14px;
  }

  .ts-nav a {
    font-size: .92rem;
  }

  .ts-hero-inner {
    padding: 32px 16px;
  }

  .ts-hero-actions {
    flex-direction: column;
  }

  .ts-btn {
    width: 100%;
  }

  .ts-grid,
  .ts-about-layout,
  .ts-news-grid {
    grid-template-columns: 1fr;
  }

  .ts-news-bottom {
    margin-top: 44px;
    padding-top: 32px;
  }

  .ts-news-bottom-brand {
    margin-top: 24px;
    margin-bottom: -12px;
  }

  .ts-post {
    border-radius: 12px;
    padding: 18px 16px;
  }

  .ts-post-content {
    font-size: 1rem;
    line-height: 1.74;
  }
}

/* 404 Page Styles */
.ts-404-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.ts-404-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.ts-404-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.ts-404-number {
  font-size: 6rem;
  font-weight: 800;
  margin: 0 0 20px 0;
  color: #121317;
  line-height: 1;
  letter-spacing: -2px;
}

.ts-404-title {
  font-size: 4rem;
  font-weight: 700;
  margin: 0 0 24px 0;
  color: #121317;
  line-height: 1.2;
  letter-spacing: -1px;
}

.ts-404-description {
  font-size: 1.25rem;
  color: #666;
  margin: 0 0 40px 0;
  line-height: 1.6;
}

.ts-404-button {
  display: inline-block;
  padding: 14px 48px;
  background: #888888;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: capitalize;
  transition: all 0.3s ease;
}

.ts-404-button:hover {
  background: #707070;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(136, 136, 136, 0.3);
}

.ts-404-news-section {
  width: 100%;
}

.ts-read-more-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 32px 0;
  color: #121317;
}

.ts-404-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.ts-404-news-grid .ts-news-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.ts-404-news-grid .ts-news-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.ts-404-news-grid .ts-news-image-wrap {
  height: 200px;
  background: #f0f0f0;
}

.ts-404-news-grid .ts-news-body {
  padding: 20px;
}

.ts-404-news-grid .ts-news-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.ts-404-news-grid .ts-news-title a {
  color: #121317;
}

.ts-404-news-grid .ts-news-title a:hover {
  color: #888888;
}

.ts-404-news-grid .ts-news-meta {
  font-size: 0.9rem;
  color: #888;
}

@media (max-width: 768px) {
  .ts-404-hero {
    padding: 30px 16px;
  }
  .ts-404-wrapper {
    gap: 40px;
  }
  .ts-404-number {
    font-size: 4rem;
  }
  .ts-404-title {
    font-size: 2.5rem;
  }
  .ts-404-description {
    font-size: 1.1rem;
  }
  .ts-404-button {
    padding: 12px 40px;
    font-size: 0.95rem;
  }
  .ts-read-more-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }
  .ts-404-news-grid {
    grid-template-columns: 1fr;
  }
}

.ts-builder-content > .wp-block-group.alignwide,
.ts-builder-content > .wp-block-cover.alignwide,
.ts-builder-content > .wp-block-columns.alignwide {
  margin-inline: 0;
}

.ts-pattern-hero,
.ts-pattern-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: clamp(18px, 2.6vw, 28px);
}

.ts-pattern-hero {
  margin-bottom: 26px;
}

.ts-pattern-section {
  margin-top: 24px;
}
