:root {
  --tf-bg: #f6f8fb;
  --tf-surface: #ffffff;
  --tf-text: #0f172a;
  --tf-muted: #475569;
  --tf-border: #dbe4ef;
  --tf-primary: #0f6bff;
  --tf-accent: #14b8a6;
  --tf-footer: #0b1220;
  --tf-warm: #f59e0b;
  --tf-soft: #f8fafc;
  --tf-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--tf-bg);
  color: var(--tf-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--tf-primary);
  text-decoration: none;
}

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

.tf-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, var(--tf-bg) 42%, #eef3f9 100%);
}

.tf-container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.tf-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(219, 228, 239, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.tf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 28px;
}

.tf-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tf-brand img {
  display: block;
  width: 172px;
  height: auto;
}

.tf-brand__fallback {
  color: var(--tf-text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.tf-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.tf-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--tf-muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.tf-nav a:hover,
.tf-nav a[aria-current="page"] {
  background: #eef6ff;
  color: var(--tf-primary);
}

.tf-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-surface);
  color: var(--tf-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.tf-hero {
  padding: 58px 0 34px;
}

.tf-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 34px;
  align-items: center;
}

.tf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--tf-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.tf-eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.tf-hero h1,
.tf-page-hero h1 {
  margin: 0;
  color: var(--tf-text);
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.tf-hero p,
.tf-page-hero p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--tf-muted);
  font-size: 18px;
  line-height: 1.9;
}

.tf-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.tf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-surface);
  color: var(--tf-text);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.tf-button--primary {
  border-color: var(--tf-primary);
  background: var(--tf-primary);
  color: #ffffff;
}

.tf-button--primary:hover {
  color: #ffffff;
  background: #095bd8;
}

.tf-hero-panel {
  overflow: hidden;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-surface);
  box-shadow: var(--tf-shadow);
}

.tf-hero-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--tf-border);
}

.tf-hero-panel__dots {
  display: flex;
  gap: 7px;
}

.tf-hero-panel__dots span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--tf-border);
}

.tf-hero-panel__dots span:nth-child(1) {
  background: #ef4444;
}

.tf-hero-panel__dots span:nth-child(2) {
  background: var(--tf-warm);
}

.tf-hero-panel__dots span:nth-child(3) {
  background: var(--tf-accent);
}

.tf-hero-panel__body {
  padding: 24px;
}

.tf-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tf-metric {
  padding: 16px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-soft);
}

.tf-metric strong {
  display: block;
  color: var(--tf-text);
  font-size: 26px;
  line-height: 1.1;
}

.tf-metric span {
  display: block;
  margin-top: 6px;
  color: var(--tf-muted);
  font-size: 13px;
}

.tf-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.tf-feature {
  padding: 14px 16px;
  border-left: 3px solid var(--tf-accent);
  background: #f2fbf9;
  color: #134e4a;
  font-weight: 800;
}

.tf-section {
  padding: 34px 0;
}

.tf-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.tf-section__head h2 {
  margin: 0;
  color: var(--tf-text);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

.tf-section__head p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--tf-muted);
}

.tf-section__link {
  color: var(--tf-primary);
  font-weight: 800;
  white-space: nowrap;
}

.tf-category-grid,
.tf-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tf-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.tf-card__label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 4px 9px;
  border-radius: 8px;
  background: #edf7ff;
  color: var(--tf-primary);
  font-size: 12px;
  font-weight: 800;
}

.tf-card h3 {
  margin: 0;
  color: var(--tf-text);
  font-size: 20px;
  line-height: 1.35;
}

.tf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tf-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-soft);
  color: var(--tf-muted);
  font-size: 13px;
  font-weight: 700;
}

.tf-chip:hover {
  border-color: rgba(15, 107, 255, 0.35);
  background: #eef6ff;
}

.tf-card-link {
  display: inline-flex;
  width: fit-content;
  margin-top: auto;
  color: var(--tf-primary);
  font-weight: 800;
}

.tf-page-hero {
  padding: 40px 0 24px;
}

.tf-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  color: var(--tf-muted);
  font-size: 14px;
  list-style: none;
}

.tf-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.tf-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-top: 22px;
}

.tf-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--tf-surface);
  color: var(--tf-text);
  outline: none;
}

.tf-search input:focus {
  border-color: rgba(15, 107, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 107, 255, 0.1);
}

.tf-list-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 18px 0 48px;
}

.tf-sidebar {
  position: sticky;
  top: 94px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.tf-sidebar__title {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--tf-border);
  font-size: 16px;
  font-weight: 900;
}

.tf-sidebar nav {
  display: grid;
  padding: 8px;
}

.tf-sidebar a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--tf-muted);
  font-size: 14px;
  font-weight: 700;
}

.tf-sidebar a:hover {
  background: #eef6ff;
  color: var(--tf-primary);
}

.tf-content-list {
  display: grid;
  gap: 16px;
}

.tf-article-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.tf-article-card__title {
  color: var(--tf-text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.4;
}

.tf-article-card__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--tf-muted);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tf-empty {
  padding: 24px;
  border: 1px dashed var(--tf-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--tf-muted);
  text-align: center;
}

.tf-article-wrap {
  padding: 34px 0 56px;
}

.tf-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-surface);
  box-shadow: var(--tf-shadow);
}

.tf-article__title {
  margin: 0;
  color: var(--tf-text);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.18;
  letter-spacing: 0;
}

.tf-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
  color: var(--tf-muted);
  font-size: 14px;
}

.tf-article__meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-soft);
}

.tf-article__image {
  margin: 4px 0 26px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--tf-soft);
}

.tf-article__image img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.tf-article__body {
  color: #1f2937;
  font-size: 18px;
  line-height: 2;
  white-space: pre-wrap;
}

.tf-article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--tf-border);
}

.tf-article-nav a,
.tf-article-nav span {
  display: block;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-soft);
  color: var(--tf-text);
  font-weight: 800;
}

.tf-article-nav small {
  display: block;
  margin-bottom: 4px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-language-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--tf-primary);
  font-weight: 800;
}

#arpage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

#arpage a,
#arpage span,
#arpage li {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  background: var(--tf-surface);
  color: var(--tf-muted);
  font-weight: 800;
  line-height: 36px;
  text-align: center;
}

#arpage .activP,
#arpage .active,
#arpage a:hover {
  border-color: var(--tf-primary);
  background: var(--tf-primary);
  color: #ffffff;
}

.tf-footer {
  padding: 28px 0;
  background: var(--tf-footer);
  color: #cbd5e1;
}

.tf-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.tf-footer a {
  color: #e2e8f0;
}

@media (max-width: 900px) {
  .tf-header__inner {
    min-height: 68px;
  }

  .tf-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tf-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--tf-border);
    border-radius: 8px;
    background: var(--tf-surface);
    box-shadow: var(--tf-shadow);
  }

  .tf-nav.is-open {
    display: flex;
  }

  .tf-nav a {
    justify-content: flex-start;
  }

  .tf-hero__grid,
  .tf-list-layout {
    grid-template-columns: 1fr;
  }

  .tf-sidebar {
    position: static;
  }

  .tf-category-grid,
  .tf-tool-grid,
  .tf-feature-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tf-container {
    width: min(100% - 24px, 1160px);
  }

  .tf-brand img {
    width: 142px;
  }

  .tf-hero {
    padding-top: 36px;
  }

  .tf-hero h1,
  .tf-page-hero h1 {
    font-size: 34px;
  }

  .tf-section__head {
    display: block;
  }

  .tf-section__link {
    display: inline-flex;
    margin-top: 8px;
  }

  .tf-search {
    flex-direction: column;
  }

  .tf-metric-grid {
    grid-template-columns: 1fr;
  }

  .tf-article {
    padding: 24px 18px;
  }

  .tf-article__body {
    font-size: 16px;
  }

  .tf-article-nav {
    grid-template-columns: 1fr;
  }

  .tf-footer__inner {
    display: block;
  }
}
