:root {
  --tf-bg: #0b0b0b;
  --tf-bg-elevated: #121212;
  --tf-surface: #161616;
  --tf-border: rgba(244, 180, 26, 0.18);
  --tf-gold: #f4b41a;
  --tf-gold-soft: #c99212;
  --tf-text: #f4f1ea;
  --tf-muted: #a8a29a;
  --tf-line: rgba(255, 255, 255, 0.08);
  --tf-max: 760px;
  --tf-radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body.tf-legal {
  margin: 0;
  min-height: 100vh;
  direction: rtl;
  text-align: right;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(244, 180, 26, 0.08), transparent 55%),
    var(--tf-bg);
  color: var(--tf-text);
  font-family: "Cairo", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--tf-gold);
  text-decoration: none;
}
a:hover { color: #ffd56a; }

.tf-wrap {
  width: min(100% - 2rem, 980px);
  margin-inline: auto;
}

/* Header */
.tf-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 11, 11, 0.88);
  border-bottom: 1px solid var(--tf-line);
}

.tf-header .tf-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.tf-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}

.tf-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  background: #000;
  border: 1px solid var(--tf-border);
}

.tf-brand strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--tf-text);
  line-height: 1.2;
}

.tf-brand small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--tf-gold);
  font-weight: 500;
}

.tf-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  justify-content: flex-start;
}

.tf-nav a {
  color: var(--tf-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: var(--tf-radius);
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.tf-nav a:hover,
.tf-nav a.is-active {
  color: var(--tf-gold);
  border-bottom-color: var(--tf-gold);
}

/* Main */
.tf-main {
  padding: 2.5rem 0 3.5rem;
}

.tf-article {
  max-width: var(--tf-max);
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.95), rgba(18, 18, 18, 0.98));
  border: 1px solid var(--tf-line);
  border-top: 1px solid var(--tf-border);
  padding: clamp(1.5rem, 3vw, 2.75rem);
}

.tf-kicker {
  margin: 0 0 0.65rem;
  color: var(--tf-gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.tf-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.tf-meta {
  margin: 0 0 1.75rem;
  color: var(--tf-muted);
  font-size: 0.9rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--tf-line);
}

.tf-prose {
  color: #e7e2d9;
  font-size: 1.02rem;
  line-height: 1.95;
}

.tf-prose h2,
.tf-prose .ql-editor h2,
.tf-prose h1,
.tf-prose .ql-editor h1 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tf-gold);
  line-height: 1.5;
}

.tf-prose h3,
.tf-prose .ql-editor h3 {
  margin: 1.5rem 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.tf-prose p,
.tf-prose .ql-editor p {
  margin: 0 0 1rem;
}

.tf-prose ul,
.tf-prose ol,
.tf-prose .ql-editor ul,
.tf-prose .ql-editor ol {
  margin: 0 0 1.1rem;
  padding-inline-start: 1.25rem;
}

.tf-prose li {
  margin-bottom: 0.45rem;
}

.tf-prose strong {
  color: #fff;
  font-weight: 600;
}

.tf-prose .ql-editor {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: normal;
}

.tf-prose .ql-editor[contenteditable="true"],
.tf-prose .ql-clipboard,
.tf-prose .ql-tooltip,
.tf-prose grammarly-extension {
  /* read-only public pages */
}

.tf-prose input {
  display: none !important;
}

/* Contact */
.tf-contact-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.tf-contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--tf-line);
  background: rgba(0, 0, 0, 0.25);
}

.tf-contact-card span {
  color: var(--tf-muted);
  font-size: 0.85rem;
}

.tf-contact-card a,
.tf-contact-card strong {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Footer */
.tf-footer {
  border-top: 1px solid var(--tf-line);
  padding: 1.75rem 0 2rem;
  background: #080808;
}

.tf-footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tf-footer-brand {
  margin: 0;
  font-weight: 700;
  color: var(--tf-gold);
  font-size: 1.05rem;
}

.tf-footer-muted {
  margin: 0.35rem 0 0;
  color: var(--tf-muted);
  font-size: 0.9rem;
}

.tf-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  font-size: 0.92rem;
}

.tf-footer-copy {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--tf-line);
  color: var(--tf-muted);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  body.tf-legal { font-size: 16px; }
  .tf-brand img { width: 48px; height: 48px; }
  .tf-nav a { font-size: 0.85rem; padding: 0.35rem 0.5rem; }
  .tf-article { padding: 1.25rem 1rem; }
}
