/* =========================================================
   Tmayt Editorial Design System
   Modern · Minimal · Premium Content Platform
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap");

:root {
  --tm-bg: #f4f6f9;
  --tm-bg-soft: #eef2f7;
  --tm-surface: #ffffff;
  --tm-ink: #141821;
  --tm-ink-soft: #2f3645;
  --tm-muted: #667085;
  --tm-faint: #98a2b3;
  --tm-accent: #0c5aa6;
  --tm-accent-hover: #094a88;
  --tm-accent-soft: #e8f1fb;
  --tm-accent-soft-hover: #d7e8f8;
  --tm-line: #e2e8f0;
  --tm-line-strong: #cbd5e1;
  --tm-success: #157347;
  --tm-success-soft: #e8f6ef;
  --tm-danger: #b42318;
  --tm-danger-soft: #fef3f2;
  --tm-admin: #0f6b4c;
  --tm-admin-soft: #e7f5ef;
  --tm-admin-line: #c6e6d7;
  --tm-rank: #0c5aa6;
  --tm-code-bg: #0f172a;
  --tm-code-fg: #e2e8f0;
  --tm-header-bg: rgba(255, 255, 255, 0.92);
  --tm-discover-bg: linear-gradient(120deg, var(--tm-accent-soft), #f8fafc 55%, #eef6ff);
  --tm-discover-border: #d7e6f7;
  --tm-avatar-bg: linear-gradient(145deg, #dbeafe, #bfdbfe);
  --tm-footer-bg: #0f172a;
  --tm-footer-fg: #cbd5e1;
  --tm-footer-muted: #94a3b8;
  --tm-footer-faint: #64748b;
  --tm-footer-line: rgba(148, 163, 184, 0.2);
  --tm-theme-color: #0c5aa6;
  --tm-radius: 14px;
  --tm-radius-sm: 10px;
  --tm-radius-xs: 8px;
  --tm-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.06);
  --tm-shadow-hover: 0 6px 16px rgba(15, 23, 42, 0.08), 0 18px 40px rgba(15, 23, 42, 0.08);
  --tm-container: 1140px;
  --tm-prose: 44rem;
  --tm-header-h: 72px;
  --tm-font: "Vazirmatn", Tahoma, sans-serif;
  --tm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tm-duration: 0.28s;
  color-scheme: light;
}

html[data-theme="dark"] {
  --tm-bg: #0b1220;
  --tm-bg-soft: #121a2b;
  --tm-surface: #151e30;
  --tm-ink: #e8eef8;
  --tm-ink-soft: #c5d0e2;
  --tm-muted: #93a0b8;
  --tm-faint: #74819a;
  --tm-accent: #4ea1ef;
  --tm-accent-hover: #7bb8f4;
  --tm-accent-soft: rgba(78, 161, 239, 0.14);
  --tm-accent-soft-hover: rgba(78, 161, 239, 0.22);
  --tm-line: #243148;
  --tm-line-strong: #334560;
  --tm-success: #3dd68c;
  --tm-success-soft: rgba(61, 214, 140, 0.12);
  --tm-danger: #f97066;
  --tm-danger-soft: rgba(249, 112, 102, 0.12);
  --tm-admin: #3dd68c;
  --tm-admin-soft: rgba(61, 214, 140, 0.12);
  --tm-admin-line: rgba(61, 214, 140, 0.28);
  --tm-rank: #4ea1ef;
  --tm-code-bg: #060b16;
  --tm-code-fg: #d7e3f4;
  --tm-header-bg: rgba(11, 18, 32, 0.9);
  --tm-discover-bg: linear-gradient(120deg, rgba(78, 161, 239, 0.16), rgba(21, 30, 48, 0.9) 55%, rgba(18, 26, 43, 0.95));
  --tm-discover-border: #2a3b57;
  --tm-avatar-bg: linear-gradient(145deg, #1d4f86, #163a63);
  --tm-footer-bg: #060b16;
  --tm-footer-fg: #c5d0e2;
  --tm-footer-muted: #8b98b0;
  --tm-footer-faint: #6b7891;
  --tm-footer-line: rgba(148, 163, 184, 0.16);
  --tm-theme-color: #0b1220;
  --tm-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.28);
  --tm-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.35), 0 20px 44px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

/* ---------- Base reset overrides ---------- */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--tm-font) !important;
  background: var(--tm-bg) !important;
  color: var(--tm-ink) !important;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.popup-mobile-menu-show {
  overflow: hidden;
}

a {
  color: var(--tm-accent);
  text-decoration: none;
  transition: color var(--tm-duration) var(--tm-ease);
}
a:hover { color: var(--tm-accent-hover); }

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

.main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--tm-bg);
}

.tm-main {
  flex: 1 0 auto;
}

.container {
  max-width: var(--tm-container);
}

/* Kill old dark theme blocks when present */
.bg-color-black,
.axil-footer-area.bg-color-black,
.axil-categories-list.bg-color-black,
.post-single-wrapper.bg-color-black,
.axil-post-list-area.bg-color-black {
  background: transparent !important;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6,
.title {
  font-family: var(--tm-font) !important;
  color: var(--tm-ink) !important;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-align: right;
}

.tm-section-head {
  margin-bottom: 1.75rem;
  text-align: right;
}
.tm-section-head__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  text-align: right;
}
.tm-section-head__desc {
  margin: 0.5rem 0 0;
  color: var(--tm-muted);
  font-size: 0.95rem;
  text-align: right;
}
.tm-section-head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tm-section-link {
  color: var(--tm-accent);
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------- Buttons ---------- */
.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--tm-radius-xs);
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--tm-duration) var(--tm-ease),
              color var(--tm-duration) var(--tm-ease),
              border-color var(--tm-duration) var(--tm-ease),
              transform var(--tm-duration) var(--tm-ease),
              box-shadow var(--tm-duration) var(--tm-ease);
}
.tm-btn:hover { transform: translateY(-1px); }
.tm-btn:active { transform: translateY(0); }
.tm-btn--primary {
  background: var(--tm-accent);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(12, 90, 166, 0.22);
}
.tm-btn--primary:hover {
  background: var(--tm-accent-hover);
  color: #fff !important;
}
.tm-btn--ghost {
  background: transparent;
  color: var(--tm-ink) !important;
  border-color: var(--tm-line-strong);
}
.tm-btn--ghost:hover {
  background: var(--tm-surface);
  border-color: var(--tm-accent);
  color: var(--tm-accent) !important;
}
.tm-btn--soft {
  background: var(--tm-accent-soft);
  color: var(--tm-accent) !important;
}
.tm-btn--soft:hover {
  background: var(--tm-accent-soft-hover);
}

/* ---------- Header ---------- */
.tm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--tm-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--tm-line);
}
.tm-header__bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--tm-header-h);
  padding: 0.65rem 0;
}
.tm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  color: var(--tm-ink) !important;
}
.tm-brand__text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.tm-brand__text span {
  color: var(--tm-accent);
}
.tm-brand img {
  max-height: 34px;
  width: auto;
  display: block;
}

.tm-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
}
@media (min-width: 992px) {
  .tm-nav { display: flex; }
}
.tm-nav > li { position: relative; }
.tm-nav > li > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  color: var(--tm-ink-soft) !important;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
}
.tm-nav > li > a:hover,
.tm-nav > li > a.is-active {
  color: var(--tm-accent) !important;
  background: var(--tm-accent-soft);
}
.tm-nav__caret {
  font-size: 0.7rem;
  opacity: 0.7;
}
.tm-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius-sm);
  box-shadow: var(--tm-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--tm-duration) var(--tm-ease),
              transform var(--tm-duration) var(--tm-ease),
              visibility var(--tm-duration);
  z-index: 50;
}
.tm-nav > li:hover > .tm-dropdown,
.tm-nav > li:focus-within > .tm-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.tm-dropdown a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: var(--tm-ink-soft) !important;
  font-weight: 500;
  font-size: 0.92rem;
}
.tm-dropdown a:hover {
  background: var(--tm-bg-soft);
  color: var(--tm-accent) !important;
}

.tm-header__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
}
.tm-search {
  position: relative;
  display: none;
}
@media (min-width: 768px) {
  .tm-search { display: block; }
}
.tm-search input {
  width: min(240px, 28vw);
  height: 42px;
  padding: 0 2.6rem 0 1rem;
  border: 1px solid var(--tm-line);
  border-radius: 999px;
  background: var(--tm-bg);
  color: var(--tm-ink);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: right;
  transition: border-color var(--tm-duration), box-shadow var(--tm-duration), width var(--tm-duration);
}
.tm-search input:focus {
  outline: none;
  width: min(300px, 36vw);
  border-color: var(--tm-accent);
  box-shadow: 0 0 0 3px rgba(12, 90, 166, 0.12);
  background: var(--tm-surface);
}
.tm-search button {
  position: absolute;
  left: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tm-muted);
  cursor: pointer;
}
.tm-search button:hover { color: var(--tm-accent); }

.tm-burger {
  width: 44px;
  height: 44px;
  border: 1px solid var(--tm-line);
  border-radius: 12px;
  background: var(--tm-surface);
  color: var(--tm-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@media (min-width: 992px) {
  .tm-burger { display: none; }
}
.tm-burger i { font-size: 1.1rem; }

/* Mobile drawer */
.tm-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}
.tm-drawer.is-open { pointer-events: auto; }
.tm-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity var(--tm-duration);
}
.tm-drawer.is-open .tm-drawer__backdrop { opacity: 1; }
.tm-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(340px, 88vw);
  height: 100%;
  background: var(--tm-surface);
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(105%);
  transition: transform 0.35s var(--tm-ease);
  display: flex;
  flex-direction: column;
  direction: rtl;
}
.tm-drawer.is-open .tm-drawer__panel { transform: translateX(0); }
.tm-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--tm-line);
}
.tm-drawer__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--tm-bg);
  color: var(--tm-ink);
  cursor: pointer;
}
.tm-drawer__search {
  padding: 1rem 1.15rem 0;
}
.tm-drawer__search input {
  width: 100%;
  height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--tm-line);
  border-radius: 12px;
  background: var(--tm-bg);
  font-family: inherit;
  text-align: right;
}
.tm-drawer__menu {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0 1.5rem;
  overflow-y: auto;
}
.tm-drawer__menu a {
  display: block;
  padding: 0.9rem 1.25rem;
  color: var(--tm-ink) !important;
  font-weight: 600;
  border-bottom: 1px solid var(--tm-line);
}
.tm-drawer__menu a.is-active { color: var(--tm-accent) !important; }
.tm-drawer__sub {
  list-style: none;
  margin: 0;
  padding: 0.25rem 1.25rem 0.75rem 1.25rem;
  background: var(--tm-bg);
}
.tm-drawer__sub a {
  border: 0;
  padding: 0.55rem 0.5rem;
  font-weight: 500;
  color: var(--tm-muted) !important;
  font-size: 0.92rem;
}

/* Admin topbar */
.tm-adminbar {
  background: #1e293b;
  color: #fff;
  font-size: 0.85rem;
}
.tm-adminbar a { color: #fff !important; }
.tm-adminbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
  gap: 1rem;
}

/* ---------- Home banners ---------- */
.tm-banner {
  padding: 1.25rem 0 0;
}
.tm-banner__slider {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--tm-radius) + 2px);
  border: 1px solid var(--tm-line);
  background: var(--tm-surface);
  box-shadow: var(--tm-shadow);
}
.tm-banner__track {
  position: relative;
}
.tm-banner__slide {
  display: none;
}
.tm-banner__slide.is-active {
  display: block;
  animation: tm-fade-up 0.45s var(--tm-ease) both;
}
.tm-banner__link {
  display: block;
  color: inherit !important;
}
.tm-banner__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 7;
  object-fit: cover;
  background: var(--tm-bg-soft);
}
@media (max-width: 767.98px) {
  .tm-banner__image {
    aspect-ratio: 16 / 9;
  }
}
.tm-banner__controls {
  position: absolute;
  inset-inline: 0;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0 0.75rem;
  pointer-events: none;
}
.tm-banner__nav,
.tm-banner__dot {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}
.tm-banner__nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.tm-banner__nav:hover {
  background: rgba(12, 90, 166, 0.9);
}
.tm-banner__dots {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
}
.tm-banner__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  padding: 0;
}
.tm-banner__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

/* ---------- Hero ---------- */
.tm-hero {
  padding: 2rem 0 1rem;
}
.tm-hero__card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  overflow: hidden;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: calc(var(--tm-radius) + 4px);
  box-shadow: var(--tm-shadow);
}
@media (max-width: 991.98px) {
  .tm-hero__card { grid-template-columns: 1fr; }
}
.tm-hero__media {
  position: relative;
  min-height: 280px;
  background: var(--tm-bg-soft);
}
.tm-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 16 / 10;
}
@media (min-width: 992px) {
  .tm-hero__media,
  .tm-hero__media img {
    height: 100%;
    min-height: 360px;
    aspect-ratio: auto;
  }
}
.tm-hero__body {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
}
.tm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--tm-accent);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.tm-hero__title {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  font-weight: 800;
  line-height: 1.4;
}
.tm-hero__title a { color: var(--tm-ink) !important; }
.tm-hero__title a:hover { color: var(--tm-accent) !important; }
.tm-hero__excerpt {
  margin: 1rem 0 0;
  color: var(--tm-muted);
  line-height: 1.9;
  font-size: 0.98rem;
}
.tm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 1.1rem;
  color: var(--tm-muted);
  font-size: 0.85rem;
}
.tm-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.tm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- Discover strip ---------- */
.tm-discover {
  margin: 1.25rem 0 0.5rem;
}
.tm-discover__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  background: var(--tm-discover-bg);
  border: 1px solid var(--tm-discover-border);
  border-radius: var(--tm-radius);
}
.tm-discover h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.tm-discover p {
  margin: 0;
  color: var(--tm-muted);
  font-size: 0.9rem;
}

/* ---------- Sections / grids ---------- */
.tm-section {
  padding: 2.5rem 0;
}
.tm-section--tight {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.tm-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
@media (min-width: 576px) {
  .tm-cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .tm-cat-grid { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
}
.tm-cat-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--tm-radius);
  border: 1px solid var(--tm-line);
  background: var(--tm-surface);
  box-shadow: var(--tm-shadow);
  transition: transform var(--tm-duration) var(--tm-ease), box-shadow var(--tm-duration) var(--tm-ease);
}
.tm-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tm-shadow-hover);
}
.tm-cat-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tm-bg-soft);
}
.tm-cat-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--tm-ease);
}
.tm-cat-card:hover .tm-cat-card__media img {
  transform: scale(1.05);
}
.tm-cat-card__label {
  padding: 0.85rem 1rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tm-ink) !important;
  text-align: center;
}

.tm-post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}
@media (min-width: 576px) {
  .tm-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .tm-post-grid { grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }
}
.tm-post-grid--4 {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 992px) {
  .tm-post-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.tm-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  overflow: hidden;
  box-shadow: var(--tm-shadow);
  transition: transform var(--tm-duration) var(--tm-ease), box-shadow var(--tm-duration) var(--tm-ease);
}
.tm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tm-shadow-hover);
}
.tm-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit !important;
}
.tm-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tm-bg-soft);
}
.tm-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--tm-ease);
}
.tm-card:hover .tm-card__media img { transform: scale(1.04); }
.tm-card__body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  text-align: right;
}
.tm-card__cat {
  color: var(--tm-accent);
  font-size: 0.78rem;
  font-weight: 700;
}
.tm-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--tm-ink) !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tm-card__excerpt {
  margin: 0;
  color: var(--tm-muted);
  font-size: 0.86rem;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tm-card__meta {
  margin-top: auto;
  padding-top: 0.55rem;
  color: var(--tm-faint);
  font-size: 0.78rem;
}

/* Ranked popular */
.tm-rank-list {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 768px) {
  .tm-rank-list { grid-template-columns: 1fr 1fr; }
}
.tm-rank-item {
  display: grid;
  grid-template-columns: auto 88px 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  box-shadow: var(--tm-shadow);
  transition: transform var(--tm-duration) var(--tm-ease), box-shadow var(--tm-duration) var(--tm-ease);
  color: inherit !important;
}
.tm-rank-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--tm-shadow-hover);
}
.tm-rank-item__num {
  width: 2rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tm-rank);
  text-align: center;
  line-height: 1;
}
.tm-rank-item__media {
  width: 88px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--tm-bg-soft);
}
.tm-rank-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tm-rank-item__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tm-ink) !important;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tm-rank-item__views {
  color: var(--tm-muted);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
@media (max-width: 420px) {
  .tm-rank-item {
    grid-template-columns: auto 1fr;
  }
  .tm-rank-item__media { display: none; }
}

/* Tags */
.tm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tm-tags a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--tm-line);
  background: var(--tm-surface);
  color: var(--tm-ink-soft) !important;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--tm-duration), border-color var(--tm-duration), color var(--tm-duration);
}
.tm-tags a:hover {
  background: var(--tm-accent-soft);
  border-color: #b9d4f0;
  color: var(--tm-accent) !important;
}

/* Video cards */
.tm-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .tm-video-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .tm-video-grid { grid-template-columns: repeat(4, 1fr); }
}
.tm-video-card {
  display: block;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  overflow: hidden;
  box-shadow: var(--tm-shadow);
  transition: transform var(--tm-duration) var(--tm-ease);
}
.tm-video-card:hover { transform: translateY(-3px); }
.tm-video-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}
.tm-video-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}
.tm-video-card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(12, 90, 166, 0.92);
  box-shadow: 0 0 0 8px rgba(12, 90, 166, 0.2);
}
.tm-video-card__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
}
.tm-video-card__title {
  margin: 0;
  padding: 0.85rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tm-ink) !important;
  text-align: right;
  line-height: 1.5;
}

/* ---------- Archive / category ---------- */
.tm-page-hero {
  padding: 2rem 0 0.5rem;
  text-align: right;
}
.tm-page-hero__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}
.tm-page-hero__desc {
  margin: 0.6rem 0 0;
  color: var(--tm-muted);
}
.tm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--tm-faint);
  font-size: 0.85rem;
}
.tm-breadcrumb a { color: var(--tm-muted) !important; }
.tm-breadcrumb a:hover { color: var(--tm-accent) !important; }

.tm-empty {
  text-align: center;
  padding: 3rem 1.25rem;
  background: var(--tm-surface);
  border: 1px dashed var(--tm-line-strong);
  border-radius: var(--tm-radius);
}
.tm-empty h3 { margin: 0 0 0.5rem; }
.tm-empty p { margin: 0; color: var(--tm-muted); }

.tm-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 2rem 0 0.5rem;
}
.tm-pagination a,
.tm-pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--tm-line);
  background: var(--tm-surface);
  color: var(--tm-ink-soft) !important;
  font-weight: 600;
  font-size: 0.9rem;
}
.tm-pagination .is-active {
  background: var(--tm-accent);
  border-color: var(--tm-accent);
  color: #fff !important;
}
.tm-pagination a:hover {
  border-color: var(--tm-accent);
  color: var(--tm-accent) !important;
}

/* ---------- Article ---------- */
.tm-article {
  padding: 1.75rem 0 2.5rem;
}
.tm-article__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 1100px) {
  .tm-article__layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: start;
  }
  .tm-article__layout--solo {
    grid-template-columns: minmax(0, 1fr);
  }
}
.tm-article__main {
  min-width: 0;
}
.tm-article__aside[hidden] {
  display: none !important;
}
.tm-article__header {
  text-align: right;
  margin-bottom: 1.5rem;
}
.tm-article__cat {
  display: inline-flex;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--tm-accent-soft);
  color: var(--tm-accent) !important;
  font-size: 0.8rem;
  font-weight: 700;
}
.tm-article__title {
  margin: 0;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 800;
  line-height: 1.4;
}
.tm-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  margin-top: 1rem;
  padding: 0.95rem 1.1rem;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius-sm);
  color: var(--tm-muted);
  font-size: 0.88rem;
}
.tm-article__cover {
  margin: 1.35rem 0 1.75rem;
  border-radius: var(--tm-radius);
  overflow: hidden;
  border: 1px solid var(--tm-line);
  background: var(--tm-bg-soft);
}
.tm-article__cover img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.tm-article__video {
  margin-bottom: 1.25rem;
  border-radius: var(--tm-radius);
  overflow: hidden;
  background: #000;
}
.tm-article__video video {
  width: 100%;
  display: block;
}

.tm-prose {
  max-width: var(--tm-prose);
  margin: 0 auto 0 0;
  text-align: right;
  color: var(--tm-ink-soft);
  font-size: 1.05rem;
  line-height: 2;
}
.tm-prose > *:first-child { margin-top: 0; }
.tm-prose p { margin: 0 0 1.25rem; }
.tm-prose h1,
.tm-prose h2,
.tm-prose h3,
.tm-prose h4 {
  color: var(--tm-ink) !important;
  margin: 2.1rem 0 0.85rem;
  scroll-margin-top: calc(var(--tm-header-h) + 16px);
  text-align: right;
}
.tm-prose h1 { font-size: 1.7rem; }
.tm-prose h2 {
  font-size: 1.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--tm-line);
}
.tm-prose h3 { font-size: 1.2rem; }
.tm-prose h4 { font-size: 1.05rem; }
.tm-prose ul,
.tm-prose ol {
  margin: 0 0 1.25rem;
  padding-right: 1.35rem;
  padding-left: 0;
}
.tm-prose li { margin-bottom: 0.4rem; }
.tm-prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-right: 4px solid var(--tm-accent);
  border-left: 0;
  background: var(--tm-accent-soft);
  border-radius: 0 var(--tm-radius-xs) var(--tm-radius-xs) 0;
  color: var(--tm-ink-soft);
  font-weight: 500;
}
.tm-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  overflow-x: auto;
  display: block;
}
.tm-prose th,
.tm-prose td {
  border: 1px solid var(--tm-line);
  padding: 0.65rem 0.8rem;
  text-align: right;
}
.tm-prose th { background: var(--tm-bg-soft); }
.tm-prose img {
  display: block;
  margin: 1.4rem auto;
  border-radius: var(--tm-radius-sm);
  border: 1px solid var(--tm-line);
}
.tm-prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tm-prose hr {
  border: 0;
  border-top: 1px solid var(--tm-line);
  margin: 2rem 0;
}
.tm-prose figure {
  margin: 1.4rem 0;
}
.tm-prose figcaption {
  margin-top: 0.5rem;
  color: var(--tm-muted);
  font-size: 0.86rem;
  text-align: center;
}
.tm-prose .language-python,
.tm-prose .language-javascript,
.tm-prose .language-html,
.tm-prose .language-css,
.tm-prose .language-bash,
.tm-prose .language-json {
  direction: ltr;
  text-align: left;
}
.tm-prose iframe,
.tm-prose embed,
.tm-prose object {
  max-width: 100%;
}
.tm-prose pre,
.tm-code-block {
  position: relative;
  direction: ltr;
  text-align: left;
  background: var(--tm-code-bg);
  color: var(--tm-code-fg);
  border-radius: var(--tm-radius-sm);
  padding: 1rem 1rem 1rem;
  overflow-x: auto;
  margin: 1.35rem 0;
  font-size: 0.88rem;
  line-height: 1.7;
}
.tm-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--tm-bg-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.tm-prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.tm-code-copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  border: 0;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: var(--tm-font);
  font-size: 0.75rem;
  cursor: pointer;
}
.tm-code-copy:hover { background: rgba(255,255,255,0.18); }
.tm-code-copy.is-copied { background: var(--tm-success); }

.tm-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--tm-line);
}
.tm-tagcloud a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--tm-bg);
  border: 1px solid var(--tm-line);
  color: var(--tm-ink-soft) !important;
  font-size: 0.82rem;
}

/* TOC */
.tm-toc {
  position: sticky;
  top: calc(var(--tm-header-h) + 1rem);
  padding: 1rem;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  box-shadow: var(--tm-shadow);
}
.tm-toc__title {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 800;
}
.tm-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tm-toc a {
  display: block;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  color: var(--tm-muted) !important;
  font-size: 0.84rem;
  line-height: 1.5;
}
.tm-toc a:hover,
.tm-toc a.is-active {
  background: var(--tm-accent-soft);
  color: var(--tm-accent) !important;
}
@media (max-width: 1099.98px) {
  .tm-toc {
    position: static;
    margin-bottom: 0.5rem;
  }
}

/* ---------- Comments ---------- */
.tm-comments {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--tm-line);
  text-align: right;
}
.tm-comments__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}
.tm-comments__title {
  margin: 0;
  font-size: 1.35rem;
}
.tm-comments__sub {
  margin: 0.35rem 0 0;
  color: var(--tm-muted);
  font-size: 0.9rem;
}
.tm-comments__count {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--tm-accent-soft);
  color: var(--tm-accent);
  font-size: 0.82rem;
  font-weight: 700;
}
.tm-thread {
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
  box-shadow: var(--tm-shadow);
}
.tm-comment {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.85rem;
  padding: 0.55rem 0;
}
.tm-comment--nested {
  margin-right: 1.25rem;
  padding-right: 0.85rem;
  border-right: 2px solid var(--tm-line);
}
.tm-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--tm-avatar-bg);
  color: var(--tm-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}
.tm-comment__top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.tm-comment__name {
  font-weight: 700;
  color: var(--tm-ink);
}
.tm-comment__date {
  color: var(--tm-faint);
  font-size: 0.8rem;
}
.tm-comment__text {
  margin: 0;
  color: var(--tm-ink-soft);
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* لینک‌های داخل نظر به‌صورت متن خام (escape شده) دیده می‌شوند؛ کلیک‌پذیر نیستند */
.tm-comment__text a {
  pointer-events: none;
  color: inherit !important;
  text-decoration: none !important;
}
.tm-admin-reply {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--tm-radius-xs);
  background: var(--tm-admin-soft);
  border: 1px solid var(--tm-admin-line);
}
.tm-admin-reply__label {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--tm-admin);
  font-size: 0.78rem;
  font-weight: 800;
}
.tm-admin-reply p {
  margin: 0;
  color: var(--tm-ink-soft);
  line-height: 1.8;
}
.tm-comment__actions {
  margin-top: 0.55rem;
}
.tm-reply-btn {
  border: 0;
  background: transparent;
  color: var(--tm-accent);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
  min-height: 36px;
}
.tm-comment-empty {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed var(--tm-line-strong);
  border-radius: var(--tm-radius);
  background: var(--tm-surface);
  margin-bottom: 1.25rem;
}
.tm-comment-empty p { margin: 0.25rem 0; color: var(--tm-muted); }

.tm-form-card {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-top: 1.5rem;
  padding: 1.35rem;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  box-shadow: var(--tm-shadow);
}
.tm-comments,
.tm-related {
  width: 100%;
  max-width: none;
}
.tm-form-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.tm-form-card__title {
  margin: 0;
  font-size: 1.1rem;
}
.tm-cancel-reply {
  border: 1px solid var(--tm-line);
  background: var(--tm-bg);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.tm-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
@media (min-width: 640px) {
  .tm-form-grid { grid-template-columns: 1fr 1fr; }
}
.tm-field label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--tm-muted);
  font-size: 0.86rem;
  font-weight: 600;
}
.tm-field input,
.tm-field textarea {
  width: 100%;
  border: 1px solid var(--tm-line);
  border-radius: 10px;
  background: var(--tm-bg);
  color: var(--tm-ink);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  text-align: right;
  direction: rtl;
  transition: border-color var(--tm-duration), box-shadow var(--tm-duration);
}
.tm-field textarea { min-height: 140px; resize: vertical; }
.tm-field input:focus,
.tm-field textarea:focus {
  outline: none;
  border-color: var(--tm-accent);
  box-shadow: 0 0 0 3px rgba(12, 90, 166, 0.12);
  background: #fff;
}
.tm-form-hint {
  margin: 0.35rem 0 0;
  color: var(--tm-faint);
  font-size: 0.8rem;
}
.tm-form-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.tm-form-status--ok { color: var(--tm-success) !important; }
.tm-form-status--error { color: var(--tm-danger) !important; }
.tm-form-status--reply { color: var(--tm-accent) !important; }

/* Related */
.tm-related {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--tm-line);
}

/* ---------- Footer ---------- */
.tm-footer {
  margin-top: auto;
  background: var(--tm-footer-bg);
  color: var(--tm-footer-fg);
  padding: 3rem 0 1.5rem;
  direction: rtl;
  text-align: right;
}
.tm-footer a { color: var(--tm-footer-fg) !important; }
.tm-footer a:hover { color: #fff !important; }
.tm-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: right;
}
@media (min-width: 768px) {
  .tm-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.tm-footer__brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  text-align: right;
}
.tm-footer__brand span { color: var(--tm-accent); }
.tm-footer__about {
  margin: 0;
  line-height: 1.85;
  color: var(--tm-footer-muted);
  max-width: 28rem;
  text-align: right;
}
.tm-footer__title {
  margin: 0 0 0.9rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
}
.tm-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
}
.tm-footer__links li { margin-bottom: 0.55rem; }
.tm-footer__links a {
  color: var(--tm-footer-muted) !important;
  font-size: 0.92rem;
}
.tm-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tm-footer-line);
  font-size: 0.85rem;
  color: var(--tm-footer-faint);
  direction: rtl;
  text-align: right;
}
.tm-social {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-start;
}
.tm-social a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: var(--tm-footer-fg) !important;
}
.tm-social a:hover { background: rgba(255,255,255,0.12); }

/* Floating action buttons */
.tm-fab {
  position: fixed;
  bottom: 1rem;
  z-index: 900;
  min-height: 44px;
  border-radius: 12px;
  border: 0;
  color: #fff !important;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--tm-font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(12, 90, 166, 0.3);
  transition: transform var(--tm-duration) var(--tm-ease), opacity var(--tm-duration);
}
.tm-fab:hover { transform: translateY(-2px); }

/* نصب اپ — سمت چپ صفحه */
.tm-fab--install,
#tm-install-app {
  left: 1rem;
  right: auto;
  padding: 0 0.95rem;
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
#tm-install-app:not([hidden]) {
  display: inline-flex;
}
html[data-theme="dark"] #tm-install-app {
  background: #1e293b !important;
}

/* برو بالا — سمت راست صفحه */
.tm-fab--top,
#backto-top {
  right: 1rem;
  left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--tm-accent) !important;
}
#backto-top.show { display: inline-flex; }
#backto-top::before {
  content: "↑";
  font-size: 1.1rem;
  line-height: 1;
}

/* Static pages */
.tm-static {
  padding: 2.5rem 0 3.5rem;
}
.tm-static__card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--tm-surface);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  box-shadow: var(--tm-shadow);
  text-align: right;
}
.tm-static__card h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.tm-static__card p {
  color: var(--tm-ink-soft);
  line-height: 1.95;
  margin: 0 0 1rem;
}
.tm-static__card ul {
  padding-right: 1.2rem;
  color: var(--tm-ink-soft);
  line-height: 1.9;
}

/* Hide legacy Axil chrome we replaced */
.header.axil-header,
.popup-mobilemenu-area,
.axil-footer-area {
  display: none !important;
}

/* Theme toggle */
.tm-theme-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--tm-line);
  border-radius: 12px;
  background: var(--tm-surface);
  color: var(--tm-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--tm-duration) var(--tm-ease),
              border-color var(--tm-duration) var(--tm-ease),
              color var(--tm-duration) var(--tm-ease),
              transform var(--tm-duration) var(--tm-ease);
}
.tm-theme-toggle:hover {
  border-color: var(--tm-accent);
  color: var(--tm-accent);
  transform: translateY(-1px);
}
.tm-theme-toggle i { font-size: 1.05rem; }
.tm-theme-toggle .tm-theme-icon--sun { display: none; }
.tm-theme-toggle .tm-theme-icon--moon { display: inline-block; }
html[data-theme="dark"] .tm-theme-toggle .tm-theme-icon--sun { display: inline-block; }
html[data-theme="dark"] .tm-theme-toggle .tm-theme-icon--moon { display: none; }

/* Utility */
.tm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@keyframes tm-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.tm-animate {
  animation: tm-fade-up 0.65s var(--tm-ease) both;
}

/* Mobile overflow guards */
@media (max-width: 359.98px) {
  .tm-hero__body { padding: 1.1rem; }
  .tm-card__title { font-size: 0.95rem; }
  .tm-prose { font-size: 0.98rem; }
}
