@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./assets/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./assets/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./assets/fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./assets/fonts/poppins-700.woff2') format('woff2');
}

:root {
  --tf-bg: #f5f9fb;
  --tf-card: #ffffff;
  --tf-primary: #006680;
  --tf-primary-light: #e3f1f5;
  --tf-accent: #f39c12;
  --tf-accent-light: #fef1dc;
  --tf-secondary: #37abc8;
  --tf-text: #14262c;
  --tf-text-secondary: #45636b;
  --tf-text-muted: #6d8a91;
  --tf-border: #e1edf1;
  --tf-shadow: rgba(0, 102, 128, 0.12);
  --tf-font: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tf-bg: #0d1a1f;
    --tf-card: #142a31;
    --tf-primary: #5fc3dd;
    --tf-primary-light: #1c3a43;
    --tf-accent: #f5b04d;
    --tf-accent-light: #3c2f1a;
    --tf-secondary: #4fc0dd;
    --tf-text: #eaf3f6;
    --tf-text-secondary: #b9ccd2;
    --tf-text-muted: #85a1a8;
    --tf-border: #24424b;
    --tf-shadow: rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--tf-bg);
  color: var(--tf-text);
  font-family: var(--tf-font);
  transition: background 0.2s, color 0.2s;
}

.tf-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background:
    radial-gradient(circle at 10% 5%, var(--tf-primary-light) 0%, transparent 40%),
    radial-gradient(circle at 90% 95%, var(--tf-accent-light) 0%, transparent 38%),
    var(--tf-bg);
}

.tf-header {
  text-align: center;
  padding: 56px 20px 28px 20px;
}
.tf-logo {
  max-width: 400px;
  width: 80%;
  height: auto;
}
.tf-tagline {
  margin: 22px auto 0 auto;
  max-width: 560px;
  color: var(--tf-text-secondary);
  font-size: 1.05rem;
  line-height: 1.5;
}

.tf-main {
  flex: 1 1 auto;
  padding: 20px 20px 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tf-category-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tf-primary);
  margin: 32px 0 16px 0;
  width: 100%;
  max-width: 960px;
  text-align: left;
  padding-left: 20px;
}

.tf-card-feature {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 480px;
}

.tf-page-intro {
  max-width: 600px;
  text-align: center;
  margin-bottom: 32px;
}

.tf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 24px;
  justify-content: center;
  max-width: 960px;
  width: 100%;
  margin-top: 12px;
}

.tf-card {
  background: var(--tf-card);
  border-radius: 18px;
  box-shadow: 0 8px 28px var(--tf-shadow);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transition: transform 0.18s, box-shadow 0.18s;
}
.tf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px var(--tf-shadow);
}
.tf-card-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}
.tf-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--tf-primary);
}
.tf-card-desc {
  color: var(--tf-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 20px 0;
  flex: 1 1 auto;
}
.tf-card-link {
  display: inline-block;
  background: var(--tf-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 8px;
  transition: background 0.18s, transform 0.1s;
}
.tf-card-link:hover {
  background: var(--tf-secondary);
}
.tf-card-link:active {
  transform: scale(0.97);
}

.tf-card-link-github {
  display: inline-block;
  margin-top: 10px;
  background: transparent;
  color: var(--tf-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
}
.tf-card-link-github:hover {
  color: var(--tf-primary);
  background: var(--tf-primary-light);
  text-decoration: underline;
}

.tf-coming-soon {
  background: var(--tf-card);
  border: 2px dashed var(--tf-border);
  border-radius: 18px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--tf-text-muted);
}
.tf-coming-soon .tf-card-title {
  color: var(--tf-text-muted);
}

.tf-oer-note {
  max-width: 640px;
  margin: 40px auto 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
}
.tf-oer-logo {
  width: 72px;
  height: auto;
  flex: none;
}
.tf-oer-note p {
  margin: 0;
  color: var(--tf-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.tf-oer-note a {
  color: var(--tf-primary);
}

@media (max-width: 480px) {
  .tf-oer-note {
    flex-direction: column;
    text-align: center;
  }
}

.tf-footer {
  text-align: center;
  padding: 24px 20px 32px 20px;
  color: var(--tf-text-muted);
  font-size: 0.85rem;
}
.tf-footer a {
  color: var(--tf-text-muted);
  text-decoration: underline;
}
.tf-footer a:hover {
  color: var(--tf-primary);
}
.tf-footer-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tf-legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 60px 20px;
}
.tf-legal h1 {
  color: var(--tf-primary);
  font-size: 1.8rem;
}
.tf-legal h2 {
  font-size: 1.15rem;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--tf-text);
}
.tf-legal p {
  color: var(--tf-text-secondary);
  line-height: 1.6;
}
.tf-legal a {
  color: var(--tf-primary);
}
.tf-back-link {
  display: inline-block;
  margin-top: 32px;
  color: var(--tf-primary);
  text-decoration: none;
  font-weight: 600;
}
.tf-back-link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .tf-header {
    padding: 40px 16px 20px 16px;
  }
  .tf-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Haupt-Navigation (Pill-Nav) --- */
.tf-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 28px auto 0 auto;
  padding: 6px;
  background: var(--tf-card);
  border: 1px solid var(--tf-border);
  border-radius: 999px;
  width: fit-content;
  max-width: calc(100% - 32px);
  box-shadow: 0 4px 16px var(--tf-shadow);
}
.tf-nav a {
  text-decoration: none;
  color: var(--tf-text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.tf-nav a:hover {
  background: var(--tf-primary-light);
  color: var(--tf-primary);
}
.tf-nav a.tf-nav-active {
  background: var(--tf-primary);
  color: #fff;
  font-weight: 600;
}
.tf-nav a.tf-nav-active:hover {
  background: var(--tf-primary);
  color: #fff;
}

/* --- Unterseiten-Überschriften (Blog, Freunde) --- */
.tf-page-title {
  text-align: center;
  margin: 26px 0 10px 0;
  font-size: 1.9rem;
  color: var(--tf-primary);
}
.tf-page-intro {
  text-align: center;
  color: var(--tf-text-secondary);
  max-width: 540px;
  margin: 0 auto 28px auto;
  line-height: 1.5;
}

/* --- Logos befreundeter Seiten (mit Emoji-Fallback im HTML) --- */
.tf-friend-logo {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
}

/* --- Blog: Empty State --- */
.tf-blog-empty {
  text-align: center;
  color: var(--tf-text-muted);
  background: var(--tf-card);
  border: 2px dashed var(--tf-border);
  border-radius: 18px;
  padding: 36px 28px;
  max-width: 480px;
  width: 100%;
  margin-top: 12px;
}

/* --- Fix: innerhalb .tf-legal überschrieb "a" sonst die Button-Schriftfarbe --- */
.tf-legal a.tf-card-link {
  color: #fff;
}

/* --- Blog: Artikel-Layout --- */
.tf-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 20px 60px 20px;
}
.tf-article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--tf-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.tf-article-meta .tf-tag {
  background: var(--tf-accent-light);
  color: var(--tf-accent);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.tf-article h1 {
  color: var(--tf-primary);
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 24px 0;
}
.tf-article h2 {
  color: var(--tf-text);
  font-size: 1.25rem;
  margin-top: 34px;
  margin-bottom: 10px;
}
.tf-article p {
  color: var(--tf-text-secondary);
  line-height: 1.7;
  margin: 0 0 16px 0;
}
.tf-article ul {
  color: var(--tf-text-secondary);
  line-height: 1.7;
  margin: 0 0 20px 0;
  padding-left: 22px;
}
.tf-article li {
  margin-bottom: 10px;
}
.tf-article-figure {
  margin: 26px 0;
}
.tf-article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 32px var(--tf-shadow);
}
.tf-article-figure figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--tf-text-muted);
  font-size: 0.82rem;
}

/* --- Kompakter Header für Unterseiten --- */
.tf-header-compact {
  padding: 32px 20px 8px 20px;
}
.tf-header-compact .tf-nav {
  margin-top: 18px;
}
.tf-logo-small {
  max-width: 200px;
  width: 60%;
}

/* --- Blog: Artikelliste (Editorial-Layout) --- */
.tf-blog-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 740px;
  width: 100%;
  margin-top: 12px;
}
a.tf-bpost {
  display: block;
  background: var(--tf-card);
  border-radius: 18px;
  box-shadow: 0 8px 28px var(--tf-shadow);
  padding: 24px;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
}
a.tf-bpost:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px var(--tf-shadow);
}
.tf-bpost-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px var(--tf-shadow);
}
.tf-bpost-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--tf-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.tf-bpost-title {
  color: var(--tf-text);
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 12px 0;
  transition: color 0.15s;
}
a.tf-bpost:hover .tf-bpost-title {
  color: var(--tf-primary);
}
.tf-bpost-excerpt {
  color: var(--tf-text-secondary);
  line-height: 1.6;
  margin: 0 0 16px 0;
}
.tf-bpost-more {
  color: var(--tf-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Kategorie-Tag: eigenständig verwendbar */
.tf-tag {
  background: var(--tf-accent-light);
  color: var(--tf-accent);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 480px) {
  a.tf-bpost {
    padding: 18px;
  }
}

/* --- Artikel: Feedback-Box statt Kommentarfunktion --- */
.tf-feedback-note {
  margin-top: 36px;
  padding: 18px 22px;
  background: var(--tf-primary-light);
  border-radius: 14px;
  color: var(--tf-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}
.tf-feedback-note a {
  color: var(--tf-primary);
  font-weight: 600;
}
