:root {
  --tp-ink: #17213c;
  --tp-muted: #667085;
  --tp-bg: #f5f7fb;
  --tp-card: #ffffff;
  --tp-primary: #5b55f6;
  --tp-primary-dark: #4640d8;
  --tp-accent: #17b897;
  --tp-border: #e5e9f2;
  --tp-shadow: 0 16px 40px rgba(23, 33, 60, 0.08);
}

html {
  min-height: 100%;
  font-size: 15px;
}

body {
  min-height: 100vh;
  color: var(--tp-ink);
  background: var(--tp-bg);
}

a {
  color: var(--tp-primary);
  text-decoration: none;
}

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

.app-header {
  background: linear-gradient(110deg, #17213c, #282459);
  box-shadow: 0 8px 28px rgba(23, 33, 60, 0.22);
}

.navbar {
  min-height: 70px;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--tp-primary), var(--tp-accent));
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.nav-link {
  font-weight: 500;
}

.hero-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.4rem;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(23, 184, 151, 0.5), transparent 28%),
    linear-gradient(120deg, #2d286c, #5b55f6);
  box-shadow: var(--tp-shadow);
}

.hero-panel p {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.84);
}

.eyebrow,
.metric-label {
  color: var(--tp-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel .eyebrow {
  color: #9cebdc;
}

.metric-card,
.content-card {
  height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--tp-border);
  border-radius: 16px;
  background: var(--tp-card);
  box-shadow: var(--tp-shadow);
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-card strong {
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.metric-card .metric-date {
  font-size: 1.65rem;
}

.metric-card small,
.page-heading p,
footer {
  color: var(--tp-muted);
}

.pricing-amount {
  display: block;
  margin: 0.65rem 0;
  font-size: 2.1rem;
}

.pricing-amount small {
  color: var(--tp-muted);
  font-size: 0.82rem;
}

.pricing-features {
  min-height: 180px;
  padding-left: 1.15rem;
  color: var(--tp-muted);
  line-height: 1.8;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.section-heading h2,
.content-card h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.page-heading {
  margin-bottom: 1.5rem;
}

.page-heading h1 {
  margin-bottom: 0.45rem;
  letter-spacing: -0.04em;
}

.chart-container {
  position: relative;
  min-height: 330px;
}

.trend-table > :not(caption) > * > * {
  padding: 0.85rem 0.55rem;
  border-color: var(--tp-border);
}

.trend-table th {
  color: var(--tp-muted);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trend-title {
  display: block;
  color: var(--tp-ink);
  font-weight: 700;
}

.trend-meta {
  display: block;
  margin-top: 0.2rem;
  color: var(--tp-muted);
  font-size: 0.76rem;
}

.country-display {
  font-weight: 700;
}

.time-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 0.12rem;
  color: var(--tp-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.time-stack span:first-child {
  color: var(--tp-ink);
  font-weight: 700;
}

.time-stack-large {
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.detail-summary {
  color: var(--tp-ink);
  font-size: 1.03rem;
  line-height: 1.75;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.related-trend {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.9rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  color: var(--tp-ink);
  background: #fff;
}

.related-trend span {
  font-weight: 800;
}

.related-trend small {
  color: var(--tp-muted);
}

.traffic-pill {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: #087760;
  background: #e5faf5;
  font-size: 0.78rem;
  font-weight: 800;
}

.empty-state {
  display: grid;
  min-height: 210px;
  place-items: center;
  color: var(--tp-muted);
  text-align: center;
}

.btn-primary {
  border-color: var(--tp-primary);
  background: var(--tp-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--tp-primary-dark);
  background: var(--tp-primary-dark);
}

.form-control,
.form-select {
  min-height: 44px;
  border-color: #d6dce8;
}

.login-shell {
  display: grid;
  min-height: 60vh;
  place-items: center;
}

.login-card {
  width: min(100%, 420px);
}

.api-example {
  margin: 0;
  padding: 1rem;
  border-radius: 10px;
  color: #dfe5ff;
  background: #17213c;
  font-size: 0.8rem;
  white-space: pre-wrap;
}

.country-order-input {
  width: 76px;
  min-height: 36px;
}

.country-form-card {
  max-width: 620px;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: stretch;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--tp-shadow);
}

.about-copy {
  padding: clamp(1.65rem, 4vw, 3.4rem);
}

.about-copy h1 {
  max-width: 720px;
  margin-bottom: 1.5rem;
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.about-bio {
  max-width: 780px;
  color: var(--tp-muted);
  font-size: 1.03rem;
  line-height: 1.78;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.7rem;
}

.about-skills span {
  padding: 0.42rem 0.72rem;
  border: 1px solid #dedcff;
  border-radius: 999px;
  color: var(--tp-primary-dark);
  background: #f5f4ff;
  font-size: 0.78rem;
  font-weight: 800;
}

.about-portrait-panel {
  position: relative;
  display: flex;
  min-height: 640px;
  align-items: end;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(23, 184, 151, 0.55), transparent 32%),
    linear-gradient(155deg, #25205a, #5b55f6);
}

.about-portrait-glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  filter: blur(2px);
}

.about-portrait {
  position: relative;
  z-index: 1;
  width: min(118%, 560px);
  max-width: none;
  height: auto;
}

footer {
  margin-top: 2rem;
  background: #fff;
}

@media (max-width: 767.98px) {
  .hero-panel {
    align-items: start;
    flex-direction: column;
    padding: 1.65rem;
  }

  .hero-panel .display-5 {
    font-size: 2.15rem;
  }

  .about-hero {
    grid-template-columns: 1fr;
  }

  .about-portrait-panel {
    min-height: 460px;
    order: -1;
  }

  .about-portrait {
    width: min(104%, 430px);
  }
}
