.twitter-fonts-page {
  --tf-ink: #10131f;
  --tf-muted: #626b7c;
  --tf-line: #d9e0ec;
  --tf-paper: #fffaf0;
  --tf-card: #ffffff;
  --tf-blue: #0f172a;
  --tf-cyan: #0891b2;
  --tf-rose: #e11d48;
  --tf-gold: #f59e0b;
  --tf-green: #059669;
}

.twitter-fonts-body {
  background:
    radial-gradient(circle at 10% 0%, rgba(8, 145, 178, 0.16), transparent 32rem),
    radial-gradient(circle at 92% 10%, rgba(245, 158, 11, 0.18), transparent 24rem),
    #f4f7fb;
}

.twitter-fonts-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(8, 13, 29, 0.97), rgba(11, 54, 70, 0.92)),
    linear-gradient(90deg, rgba(225, 29, 72, 0.38), rgba(245, 158, 11, 0.28));
}

.twitter-fonts-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -42% 42%;
  height: 260px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(-9deg);
}

.twitter-fonts-hero .hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 26px;
  align-items: center;
  padding-bottom: 44px;
}

.hero-badges,
.tf-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges {
  margin-top: 22px;
}

.hero-badges span,
.tf-pill-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.hero-phone {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}

.hero-phone-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  color: var(--tf-ink);
}

.hero-phone-cover {
  height: 78px;
  background:
    radial-gradient(circle at 20% 25%, #fff 0 8px, transparent 9px),
    linear-gradient(135deg, #0f172a, #0891b2 50%, #f59e0b);
}

.hero-phone-body {
  position: relative;
  padding: 0 18px 18px;
}

.hero-avatar {
  width: 58px;
  height: 58px;
  margin-top: -28px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 999px;
  background: #10131f;
  color: #fff;
  font-size: 24px;
}

.hero-phone-name {
  margin: 10px 0 2px;
  font-size: 22px;
  font-weight: 900;
}

.hero-phone-handle,
.hero-phone-bio {
  margin: 0;
  color: #536070;
}

.hero-phone-bio {
  margin-top: 10px;
  line-height: 1.55;
}

.tf-wrap {
  max-width: 1180px;
  margin: -22px auto 0;
  padding: 0 20px 48px;
}

.tf-app {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.tf-panel,
.tf-preview,
.tf-section {
  border: 1px solid var(--tf-line);
  border-radius: 16px;
  background: var(--tf-card);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
}

.tf-panel {
  overflow: hidden;
}

.tf-quickstart {
  display: grid;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--tf-line);
  background:
    linear-gradient(135deg, rgba(236, 254, 255, 0.96), rgba(255, 251, 235, 0.94));
}

.tf-quickstart-title {
  margin: 0;
  color: var(--tf-ink);
  font-size: 14px;
  font-weight: 950;
}

.tf-quickstart ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  list-style: none;
}

.tf-quickstart li {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.tf-quickstart strong,
.tf-quickstart span {
  display: block;
}

.tf-quickstart strong {
  color: var(--tf-ink);
  font-size: 13px;
}

.tf-quickstart span {
  margin-top: 4px;
  color: var(--tf-muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.tf-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  border-bottom: 1px solid var(--tf-line);
}

.tf-work-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 0;
  background: #fff;
}

.tf-work-tab {
  position: relative;
  min-height: 54px;
  border: 1px solid var(--tf-line);
  border-radius: 16px;
  background: #f8fafc;
  color: var(--tf-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.tf-work-tab.active {
  border-color: #0891b2;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.12), rgba(245, 158, 11, 0.12)),
    #fff;
  color: var(--tf-ink);
  box-shadow: 0 10px 28px rgba(8, 145, 178, 0.12);
}

.tf-work-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-right: 1px solid var(--tf-line);
  border-bottom: 1px solid var(--tf-line);
  transform: translateX(-50%) rotate(45deg);
}

.tf-work-panel {
  display: none;
}

.tf-work-panel.active {
  display: block;
}

.tf-field {
  display: grid;
  gap: 7px;
}

.tf-edit-field {
  position: relative;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.tf-edit-field.is-active {
  border-color: #67e8f9;
  background: #f8feff;
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.18);
}

.tf-edit-field.is-active::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: #f8feff;
  border-right: 1px solid #67e8f9;
  border-bottom: 1px solid #67e8f9;
  transform: rotate(45deg);
}

.tf-field label,
.tf-block-title {
  color: var(--tf-ink);
  font-size: 13px;
  font-weight: 900;
}

.tf-field input,
.tf-field textarea {
  width: 100%;
  border: 1px solid var(--tf-line);
  border-radius: 12px;
  background: #fff;
  color: var(--tf-ink);
  font: inherit;
  font-size: 16px;
}

.tf-field input {
  height: 46px;
  padding: 0 13px;
}

.tf-field textarea {
  min-height: 96px;
  padding: 12px 13px;
  line-height: 1.55;
  resize: vertical;
}

.tf-field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-count.over {
  color: var(--tf-rose);
}

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

.tf-app.tools-open .tf-companion {
  animation: tfCompanionIn 0.14s ease-out;
}

.tf-app.is-editing-name [data-tf-bio-only] {
  display: none;
}

@keyframes tfCompanionIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tf-companion {
  margin: 0;
  padding: 15px 16px;
  border-bottom: 1px solid var(--tf-line);
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.1), rgba(245, 158, 11, 0.12)),
    #fff;
}

.tf-companion span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.tf-companion h2 {
  margin: 10px 0 5px;
  color: var(--tf-ink);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.tf-companion p {
  margin: 0;
  color: var(--tf-muted);
  line-height: 1.6;
  font-size: 14px;
  font-weight: 750;
}

.tf-btn {
  min-height: 42px;
  border: 1px solid var(--tf-line);
  border-radius: 12px;
  background: #fff;
  color: var(--tf-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.tf-btn.primary {
  border-color: var(--tf-blue);
  background: var(--tf-blue);
  color: #fff;
}

.tf-btn.accent {
  border-color: #bae6fd;
  background: #ecfeff;
  color: #155e75;
}

.tf-btn:hover {
  transform: translateY(-1px);
}

.tf-btn.copied {
  border-color: var(--tf-green);
  background: var(--tf-green);
  color: #fff;
}

.tf-tabs {
  display: flex;
  gap: 7px;
  padding: 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--tf-line);
  background: #f8fafc;
  scrollbar-width: none;
}

.tf-tabs::-webkit-scrollbar {
  display: none;
}

.tf-tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--tf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--tf-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.tf-tab.active {
  border-color: var(--tf-cyan);
  background: var(--tf-cyan);
  color: #fff;
}

.tf-results,
.tf-inserts,
.tf-templates {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.tf-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--tf-line);
  border-radius: 14px;
  background: #fff;
}

.tf-result-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  min-width: 112px;
}

.tf-result-actions .tf-btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.tf-result:hover {
  border-color: #67e8f9;
  background: #f8feff;
}

.tf-result-output {
  min-width: 0;
  color: var(--tf-ink);
  font-size: 23px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tf-result-meta {
  margin-top: 5px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-preview {
  position: sticky;
  top: 14px;
  overflow: hidden;
}

.tf-preview-cover {
  height: 116px;
  background:
    radial-gradient(circle at 12% 20%, #fff 0 12px, transparent 13px),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.65) 0 8px, transparent 9px),
    linear-gradient(135deg, #111827, #0e7490 48%, #f59e0b);
}

.tf-preview-body {
  padding: 0 18px 18px;
}

.tf-preview-avatar {
  width: 76px;
  height: 76px;
  margin-top: -38px;
  display: grid;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 999px;
  background: #10131f;
  color: #fff;
  font-size: 32px;
}

.tf-preview-name {
  margin: 12px 0 1px;
  color: var(--tf-ink);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tf-preview-handle,
.tf-preview-bio,
.tf-preview-meta {
  margin: 0;
  color: var(--tf-muted);
  line-height: 1.55;
}

.tf-preview-bio {
  margin-top: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tf-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 13px;
  font-size: 13px;
}

.tf-preview-copy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 0 18px 18px;
}

.tf-preview-handle-editor {
  display: grid;
  gap: 7px;
  margin: 0 18px 14px;
  padding: 12px;
  border: 1px solid var(--tf-line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(236, 254, 255, 0.92));
}

.tf-preview-handle-editor label {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 900;
}

.tf-preview-handle-editor input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--tf-line);
  border-radius: 12px;
  background: #fff;
  color: var(--tf-ink);
  font: inherit;
  font-size: 15px;
  padding: 0 12px;
}

.tf-block {
  border-top: 1px solid var(--tf-line);
  background: #fff;
}

.tf-block-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
}

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

.tf-chip {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--tf-line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--tf-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.tf-chip:hover {
  border-color: #67e8f9;
  background: #ecfeff;
}

.tf-template {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--tf-line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.tf-template strong {
  color: var(--tf-ink);
}

.tf-template span {
  color: var(--tf-muted);
  font-size: 13px;
  line-height: 1.55;
}

.tf-template:hover {
  border-color: #fed7aa;
  background: #fff7ed;
}

.tf-section {
  max-width: 1180px;
  margin: 0 auto 28px;
  padding: 24px;
}

.tf-section h2,
.tf-section h3 {
  color: var(--tf-ink);
}

.tf-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
}

.tf-section p {
  color: var(--tf-muted);
  line-height: 1.8;
}

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

.tf-info-card {
  padding: 16px;
  border: 1px solid var(--tf-line);
  border-radius: 14px;
  background: #fbfdff;
}

.tf-info-card strong {
  color: var(--tf-ink);
}

.tf-info-card p {
  margin: 8px 0 0;
}

.tf-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  min-width: 180px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #10131f;
  color: #fff;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
  transition: 0.18s ease;
}

.tf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 880px) {
  .twitter-fonts-hero .hero-inner,
  .tf-app {
    grid-template-columns: 1fr;
  }

  .hero-phone {
    max-width: 420px;
  }

  .tf-preview {
    position: static;
  }

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

@media (max-width: 560px) {
  .twitter-fonts-hero .hero-inner {
    padding-top: 34px;
  }

  .tf-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .tf-actions,
  .tf-preview-copy {
    grid-template-columns: 1fr;
  }

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

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

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

  .tf-result-output {
    font-size: 20px;
  }
}
