/* ToolDolfen — dark UI matched to production screenshot */

:root {
  --bg-app: #070b14;
  --bg-hero: #0b1220;
  --bg-card: #111827;
  --bg-card-2: #151c2c;
  --bg-elevated: #1a2336;
  --bg-muted: #243044;
  --border-subtle: #243044;
  --border-strong: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --brand-600: #6366f1;
  --brand-500: #818cf8;
  --brand-400: #a5b4fc;
  --brand-50: rgba(99,102,241,.12);
  --accent: #22d3ee;
  --emerald: #34d399;
  --rose: #fb7185;
  --amber: #fbbf24;
  --violet: #c084fc;
  --pink: #f472b6;
  --cyan: #22d3ee;
  --indigo: #818cf8;
  --shadow-card: 0 8px 24px rgba(0,0,0,.28);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); background: var(--bg-app); color: var(--text-main);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-400); }
button, input, select, textarea { font: inherit; }
.site-main { flex: 1; }

.skip-link {
  position: absolute;
  top: -120px;
  left: 1rem;
  background: var(--brand-600);
  color: #fff;
  padding: .65rem 1.25rem;
  border-radius: .5rem;
  font-weight: 700;
  font-size: .9rem;
  z-index: 100000;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: top .2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid #fff;
}

.btn-footer-link {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.btn-footer-link:hover {
  color: var(--brand-400);
}

.container-7xl { width: min(80rem, calc(100% - 1.75rem)); margin-inline: auto; }
.container-4xl { width: min(56rem, calc(100% - 1.75rem)); margin-inline: auto; }
.container-5xl { width: min(64rem, calc(100% - 1.75rem)); margin-inline: auto; }

/* Icon color tokens */
.ico-image, .ico-indigo { color: #60a5fa; }
.ico-pdf { color: #fb7185; }
.ico-text, .ico-emerald { color: #34d399; }
.ico-converter, .ico-amber { color: #fbbf24; }
.ico-violet { color: #c084fc; }
.ico-pink { color: #f472b6; }
.ico-cyan { color: #22d3ee; }
.ico-default { color: var(--brand-400); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 18, 32, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-top: max(0px, env(safe-area-inset-top));
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
}
.header-brand-wrap {
  display: flex; align-items: center; gap: 1.35rem; min-width: 0;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; min-width: 0; }
.brand-icon {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(to top right, #4f46e5, #4f46e5, #06b6d4);
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}
.brand-icon svg { width: 26px; height: 26px; }
.brand-text { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; color: var(--text-main); white-space: nowrap; }
.brand-text .hi {
  background: linear-gradient(90deg, #818cf8, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-desktop { display: none; align-items: center; gap: 1.15rem; font-size: .875rem; font-weight: 500; color: #cbd5e1; }
.nav-desktop a:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: .45rem; flex-shrink: 0; }
.icon-btn, .chip-btn {
  height: 36px; border-radius: 10px; border: 1px solid var(--border-subtle);
  background: rgba(30,41,59,.6); color: #cbd5e1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: 0 .7rem; font-size: .8rem; font-weight: 600; text-decoration: none;
}
.icon-btn { width: 36px; padding: 0; }
.icon-btn:hover, .chip-btn:hover { color: #fff; border-color: #475569; }
.header-search {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 36px; min-width: 36px; border-radius: 10px;
  border: 1px solid var(--border-subtle); background: rgba(15,23,42,.8);
  padding: 0 .65rem; color: #94a3b8; font-size: .8rem; cursor: pointer;
}
.header-search:hover { color: #e2e8f0; border-color: #475569; }
.header-search-label { display: none; }
.header-search kbd {
  display: none; margin-left: auto; border: 1px solid var(--border-strong); border-radius: 6px;
  padding: .05rem .35rem; font-size: .68rem; color: #64748b;
}

/* Nav Toggle & Icons */
.nav-toggle {
  position: relative;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.nav-toggle[aria-expanded="true"] {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  color: #a5b4fc;
}
.nav-toggle-icon {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.nav-toggle-icon[hidden] { display: none !important; }

/* Responsive Header Tweaks */
@media (max-width: 1023px) {
  .header-lang-btn { display: none !important; }
  .header-admin-btn { display: none !important; }
}

@media (max-width: 480px) {
  .header-actions { gap: .35rem; }
  .brand-text { font-size: 1.05rem; }
  .brand-icon { width: 32px; height: 32px; border-radius: 10px; }
  .brand-icon svg { width: 22px; height: 22px; }
  .icon-btn, .header-search { height: 34px; min-width: 34px; width: 34px; }
}

/* World-Class Mobile Navigation Drawer */
.nav-mobile[hidden] { display: none !important; }
.nav-mobile {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: rgba(11, 18, 32, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(255, 255, 255, 0.04);
  max-height: calc(100vh - 65px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: tdNavSlideDown .2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99;
}

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

.nav-mobile-inner {
  padding: 1rem 1rem 1.75rem;
  display: flex; flex-direction: column; gap: 1.15rem;
  max-width: 640px; margin: 0 auto;
}

/* Mobile Quick Search Bar */
.nav-mobile-search {
  display: flex; align-items: center; gap: .65rem;
  width: 100%; padding: .7rem .95rem; border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  color: #94a3b8; font-size: .84rem; text-align: left; cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.nav-mobile-search:hover, .nav-mobile-search:focus-visible {
  border-color: rgba(99, 102, 241, 0.55);
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.85);
}
.nav-mobile-search-icon { color: #818cf8; display: flex; align-items: center; flex-shrink: 0; }
.nav-mobile-search-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-mobile-search-kbd {
  display: inline-block; padding: .1rem .4rem; border-radius: 6px;
  background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: .7rem; color: #64748b; font-family: inherit;
}

/* Mobile Drawer Sections */
.nav-mobile-section { display: flex; flex-direction: column; gap: .6rem; }
.nav-mobile-section-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #64748b; padding: 0 .25rem;
}

/* 2x2 Category Cards Grid */
.nav-mobile-cat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem;
}
.nav-mobile-cat-card {
  display: flex; align-items: center; gap: .65rem;
  padding: .7rem .8rem; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(24, 34, 52, 0.55);
  color: var(--text-main); text-decoration: none;
  transition: all .15s ease;
}
.nav-mobile-cat-card:hover, .nav-mobile-cat-card:active {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}
.nav-cat-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid; place-items: center; flex-shrink: 0;
}
.cat-card-image .nav-cat-icon { background: rgba(96, 165, 250, 0.12); }
.cat-card-pdf .nav-cat-icon { background: rgba(251, 113, 133, 0.12); }
.cat-card-text .nav-cat-icon { background: rgba(52, 211, 153, 0.12); }
.cat-card-converter .nav-cat-icon { background: rgba(251, 191, 36, 0.12); }

.nav-cat-info { display: flex; flex-direction: column; min-width: 0; }
.nav-cat-name { font-size: .82rem; font-weight: 700; color: #f1f5f9; line-height: 1.2; }
.nav-cat-sub {
  font-size: .68rem; color: #94a3b8; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-top: .15rem;
}

/* Nav rows list */
.nav-mobile-links-list { display: flex; flex-direction: column; gap: .35rem; }
.nav-mobile-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .85rem; border-radius: 10px;
  background: rgba(18, 26, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1; text-decoration: none;
  font-size: .84rem; font-weight: 500;
  transition: all .15s ease;
}
.nav-mobile-row:hover, .nav-mobile-row:active {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav-row-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-row-text { flex: 1; }
.nav-row-badge {
  font-size: .65rem; font-weight: 700; padding: .15rem .45rem;
  border-radius: 999px; background: rgba(99, 102, 241, 0.15);
  color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3);
}
.nav-row-badge.badge-success {
  background: rgba(16, 185, 129, 0.15); color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}
.nav-row-arrow { color: #475569; flex-shrink: 0; transition: transform .15s ease; }
.nav-mobile-row:hover .nav-row-arrow { color: #94a3b8; transform: translateX(2px); }

/* Nav Mobile Footer: User & Controls */
.nav-mobile-footer {
  margin-top: .35rem; padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; flex-direction: column; gap: .85rem;
}
.nav-mobile-auth-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
}
.nav-mobile-auth-grid .btn { width: 100%; justify-content: center; padding: .6rem .8rem; font-size: .82rem; }
.nav-mobile-user-card {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem .9rem; border-radius: 12px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-user-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.nav-user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nav-user-name { font-size: .84rem; font-weight: 700; color: #f8fafc; line-height: 1.2; }
.nav-user-email {
  font-size: .72rem; color: #94a3b8; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.nav-user-actions { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.nav-mobile-bottom-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 .25rem; font-size: .74rem; color: #64748b;
}
.nav-lang-pill { display: inline-flex; align-items: center; gap: .35rem; color: #94a3b8; }
.nav-privacy-pill { display: inline-flex; align-items: center; gap: .35rem; color: #34d399; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: 999px; padding: .55rem 1rem; font-weight: 600; font-size: .875rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: linear-gradient(90deg, #6366f1, #4f46e5); color: #fff; box-shadow: 0 8px 20px rgba(79,70,229,.3); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text-main); }
.btn-ghost { background: transparent; color: #94a3b8; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.btn-danger { background: #e11d48; color: #fff; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.25rem 0 2.5rem; text-align: center;
}
.hero-dots {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(148,163,184,.35) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 55% 55% at 50% 40%, #000 55%, transparent 100%);
}
.hero-inner { position: relative; }
.badge-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  border-radius: 999px; border: 1px solid rgba(129,140,248,.35);
  background: rgba(99,102,241,.12); color: #c7d2fe;
  padding: .28rem .8rem; font-size: .72rem; font-weight: 700; margin-bottom: .9rem;
}
.hero h1 {
  margin: 0; font-size: clamp(1.7rem, 5vw, 3.15rem);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.12; color: #fff;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #67e8f9, #818cf8 45%, #e879f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  margin: .85rem auto 0; max-width: 38rem;
  color: #94a3b8; font-size: clamp(.8rem, 2vw, .98rem);
}
.search-box {
  margin: 1.4rem auto 0; max-width: 36rem;
  display: flex; align-items: center; gap: .55rem;
  border: 1px solid #3b4a66; border-radius: 999px;
  background: #0a101c; padding: .7rem 1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.search-box:focus-within { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.15); }
.search-box input {
  flex: 1; border: 0; outline: 0; background: transparent;
  color: #f8fafc; font-size: .9rem; min-width: 0;
}
.search-box input::placeholder { color: #64748b; }
.trust-row {
  margin-top: 1.1rem; display: flex; flex-wrap: wrap; justify-content: center;
  gap: .65rem 1.1rem; font-size: .75rem; color: #94a3b8; font-weight: 600;
}
.trust-row .ok { color: #34d399; display: inline-flex; align-items: center; gap: .35rem; }
.trust-row .brandish { color: #a5b4fc; display: inline-flex; align-items: center; gap: .35rem; }
.trust-row .sep { opacity: .4; }

/* Category tabs */
.cat-tabs {
  display: flex; gap: .5rem; overflow-x: auto; padding: .2rem;
  margin: 1.5rem 0 1.15rem; justify-content: flex-start;
}
@media (min-width: 768px) { .cat-tabs { justify-content: center; } }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  white-space: nowrap; border-radius: 999px; padding: .45rem 1rem;
  font-size: .78rem; font-weight: 700; border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 26, 43, 0.75); color: #e2e8f0; cursor: pointer; flex-shrink: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .2s cubic-bezier(.16, 1, .3, 1);
}
.cat-tab:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(30, 41, 59, 0.85);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
}
.cat-tab.active-all {
  background: #fff; color: #0f172a; border-color: #fff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
}
.cat-tab.active {
  background: linear-gradient(90deg, #6366f1, #4f46e5); color: #fff;
  border-color: rgba(129, 140, 248, 0.6);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}

.section-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; margin: 0; color: #fff; }
.section-sub { font-size: .75rem; color: #94a3b8; margin: .25rem 0 0; }

.tools-panel {
  margin-top: .25rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 26, 43, 0.78) 0%, rgba(14, 21, 36, 0.86) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.15rem 1.15rem 1.35rem;
  box-shadow: 0 20px 45px -10px rgba(2, 6, 23, 0.8), 0 0 35px rgba(99, 102, 241, 0.06);
}

/* Tool tiles */
.tool-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}
@media (min-width: 640px) { .tool-icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; } }
@media (min-width: 768px) { .tool-icon-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tool-icon-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* AdSense Ad Slots */
.ad-slot {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #131c2d 0%, #0d1422 100%);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: 1rem;
  padding: .65rem .75rem;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.ad-slot:hover {
  border-color: rgba(129, 140, 248, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ad-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: .45rem;
  pointer-events: none;
}
.ad-badge {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  padding: .15rem .5rem;
  border-radius: .35rem;
  border: 1px solid rgba(51, 65, 85, 0.5);
  line-height: 1.2;
}
.ad-subbadge {
  font-size: .6rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ad-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: .75rem;
  width: 100%;
  height: 100%;
  border-radius: .75rem;
  background: rgba(10, 15, 26, 0.55);
  border: 1px solid rgba(42, 54, 76, 0.6);
  box-sizing: border-box;
}
.ad-ph-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .65rem;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: .45rem;
}
.ad-ph-title {
  font-size: .82rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.25;
}
.ad-ph-dims {
  font-size: .72rem;
  font-weight: 600;
  color: #818cf8;
  margin-top: .25rem;
  letter-spacing: .02em;
}
.ad-ph-note {
  font-size: .65rem;
  color: #64748b;
  margin-top: .3rem;
}

/* Horizontal Leaderboards & Article Banners */
.ad-slot-leaderboard,
.ad-slot-tool-bottom,
.ad-slot-blog-top,
.ad-slot-blog-bottom,
.ad-slot-blog-index {
  min-height: 96px;
  width: 100%;
}
.ad-slot-tool-bottom {
  margin: 1.5rem auto 1rem;
}
.ad-slot-blog-top {
  margin: 1.25rem 0 1.5rem;
}
.ad-slot-blog-bottom {
  margin: 2rem 0 1rem;
}
.ad-slot-blog-index {
  grid-column: 1 / -1;
  margin: .5rem 0;
}

.ad-slot-leaderboard .ad-placeholder,
.ad-slot-tool-bottom .ad-placeholder,
.ad-slot-blog-top .ad-placeholder,
.ad-slot-blog-bottom .ad-placeholder,
.ad-slot-blog-index .ad-placeholder {
  flex-direction: row;
  justify-content: center;
  gap: 1.25rem;
  padding: .6rem 1.25rem;
}
.ad-slot-leaderboard .ad-ph-icon,
.ad-slot-tool-bottom .ad-ph-icon,
.ad-slot-blog-top .ad-ph-icon,
.ad-slot-blog-bottom .ad-ph-icon,
.ad-slot-blog-index .ad-ph-icon {
  margin-bottom: 0;
}

/* Google Native In-Article Ad Unit */
.ad-slot-blog-in-article {
  margin: 2.25rem auto;
  width: 100%;
  min-height: 110px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px dashed rgba(99, 102, 241, 0.35);
}
.ad-slot-blog-in-article .ad-placeholder {
  flex-direction: row;
  justify-content: center;
  gap: 1.25rem;
  padding: .75rem 1.25rem;
}
.ad-slot-blog-in-article .ad-ph-icon {
  margin-bottom: 0;
}

/* Sticky Blog Sidebar Ad Unit */
.ad-slot-blog-sidebar {
  min-height: 280px;
  width: 100%;
  margin: 0;
}

@media (max-width: 639px) {
  .ad-slot-leaderboard .ad-placeholder,
  .ad-slot-tool-bottom .ad-placeholder,
  .ad-slot-blog-top .ad-placeholder,
  .ad-slot-blog-in-article .ad-placeholder,
  .ad-slot-blog-bottom .ad-placeholder,
  .ad-slot-blog-index .ad-placeholder {
    flex-direction: column;
    gap: .25rem;
    padding: .5rem;
  }
}
}

/* Grid Layout on Desktop (min-width: 1024px) */
@media (min-width: 1024px) {
  .tool-icon-grid:not(.has-filters) .ad-slot-top-side {
    grid-column: 5 / span 2;
    grid-row: 1 / span 3;
    min-height: 380px;
  }
  .tool-icon-grid:not(.has-filters) .ad-slot-leaderboard {
    grid-column: 1 / -1;
    grid-row: 4;
    min-height: 96px;
    margin: .2rem 0;
  }
  .tool-icon-grid:not(.has-filters) .ad-slot-bottom-side {
    grid-column: 5 / span 2;
    grid-row: 7 / span 2;
    min-height: 248px;
  }
}

/* Tablet & Mobile responsive fallback */
@media (max-width: 1023px) {
  .ad-slot {
    grid-column: 1 / -1;
    min-height: 140px;
    margin: .25rem 0;
  }
  .ad-slot-leaderboard {
    min-height: 90px;
  }
}

/* Hide ads during search or active category filters */
.tool-icon-grid.has-filters .ad-slot {
  display: none !important;
}

/* Homepage Floating Tools Section */
.home-tools-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg-canvas, #070b14);
}
.home-tools-particles {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  margin-bottom: -100vh;
  pointer-events: none !important;
  z-index: 0;
  overflow: hidden;
  opacity: .85;
}
.home-tools-particles canvas {
  display: block;
  width: 100% !important;
  height: 100vh !important;
  pointer-events: none !important;
}
.home-tools-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 65% 55% at 92% 10%, rgba(99, 102, 241, 0.12), transparent 60%),
    radial-gradient(ellipse 55% 50% at 8% 35%, rgba(56, 189, 248, 0.10), transparent 55%),
    radial-gradient(ellipse 65% 55% at 90% 65%, rgba(168, 85, 247, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 45% at 12% 90%, rgba(34, 211, 238, 0.06), transparent 50%);
}
.home-tools-container {
  position: relative;
  z-index: 1;
}

/* Stable, high-precision tools grid with instant GPU hover elevation */
.tool-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #182234 0%, #111827 100%);
  padding: 1rem .7rem .95rem; text-align: center;
  transition: transform .15s cubic-bezier(0.16, 1, 0.3, 1),
              border-color .15s ease,
              box-shadow .15s ease,
              background .15s ease;
  min-height: 118px;
  box-shadow: 0 4px 12px -2px rgba(2, 6, 23, 0.6), 0 0 8px rgba(99, 102, 241, 0.03);
  transform: translate3d(0, 0, 0);
  will-change: transform;
  position: relative;
}
.tool-tile:hover {
  transform: translate3d(0, -6px, 0) scale(1.02);
  border-color: rgba(129, 140, 248, 0.65);
  background: linear-gradient(180deg, #1f2b42 0%, #182234 100%);
  box-shadow:
    0 16px 28px -6px rgba(2, 6, 23, 0.85),
    0 0 20px rgba(99, 102, 241, 0.25),
    0 0 8px rgba(56, 189, 248, 0.16);
  color: inherit;
}

/* Category-specific dynamic hover glows */
.tool-tile[data-cat="image"]:hover {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 16px 28px -6px rgba(2, 6, 23, 0.85), 0 0 20px rgba(56, 189, 248, 0.28);
}
.tool-tile[data-cat="pdf"]:hover {
  border-color: rgba(251, 113, 133, 0.65);
  box-shadow: 0 16px 28px -6px rgba(2, 6, 23, 0.85), 0 0 20px rgba(244, 63, 94, 0.28);
}
.tool-tile[data-cat="text"]:hover {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 16px 28px -6px rgba(2, 6, 23, 0.85), 0 0 20px rgba(16, 185, 129, 0.28);
}
.tool-tile[data-cat="converter"]:hover {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 16px 28px -6px rgba(2, 6, 23, 0.85), 0 0 20px rgba(245, 158, 11, 0.28);
}

.tool-icon-wrap {
  width: 3.15rem; height: 3.15rem; border-radius: .95rem;
  display: grid; place-items: center;
  background: rgba(7, 11, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform .16s cubic-bezier(0.16, 1, 0.3, 1);
}
.tool-tile:hover .tool-icon-wrap {
  transform: translate3d(0, -2px, 0) scale(1.08);
}
  border-color: rgba(129, 140, 248, 0.55);
  background: rgba(99, 102, 241, 0.16);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.25);
  transform: translateZ(24px) scale(1.06);
}
.tool-tile[data-cat="image"]:hover .tool-icon-wrap {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(59, 130, 246, 0.16);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.25);
}
.tool-tile[data-cat="pdf"]:hover .tool-icon-wrap {
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(244, 63, 94, 0.16);
  box-shadow: 0 8px 18px rgba(244, 63, 94, 0.25);
}
.tool-tile[data-cat="text"]:hover .tool-icon-wrap {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.16);
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.25);
}
.tool-tile[data-cat="converter"]:hover .tool-icon-wrap {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(245, 158, 11, 0.16);
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.25);
}

.tool-tile span {
  font-size: .72rem; font-weight: 600; color: #e2e8f0; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transform: translateZ(10px);
  transition: color .18s ease;
}
.tool-tile:hover span { color: #fff; }

.cat-block {
  margin-top: 1.75rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #121a2b 0%, #0e1524 100%);
  padding: 1.2rem 1.2rem 1.35rem;
  box-shadow: 0 12px 28px -8px rgba(2, 6, 23, 0.7);
  position: relative;
  overflow: hidden;
}
.cat-block::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #6366f1, #22d3ee);
}
.cat-block[data-block="image"]::before { background: linear-gradient(180deg, #60a5fa, #6366f1); }
.cat-block[data-block="pdf"]::before { background: linear-gradient(180deg, #fb7185, #f43f5e); }
.cat-block[data-block="text"]::before { background: linear-gradient(180deg, #34d399, #10b981); }
.cat-block[data-block="converter"]::before { background: linear-gradient(180deg, #fbbf24, #f59e0b); }

.cat-block-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: .95rem; margin-bottom: 1.05rem;
}
.cat-block-head h3 { margin: 0; font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.cat-block-head p { margin: .35rem 0 0; font-size: .78rem; color: #94a3b8; max-width: 42rem; line-height: 1.45; }
.link-brand {
  color: #a5b4fc !important; font-size: .78rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .4rem .7rem; border-radius: 999px; border: 1px solid rgba(129, 140, 248, 0.25);
  background: rgba(99,102,241,.10); white-space: nowrap;
}
.link-brand:hover { background: rgba(99,102,241,.20); border-color: #6366f1; color: #c7d2fe !important; }

.value-section, .faq-section, .panel-card, .auth-card, .content-card {
  margin: 2rem 0; border-radius: 1.35rem; border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #121a2b 0%, #0e1524 100%);
  padding: 1.4rem; box-shadow: 0 12px 28px -8px rgba(2, 6, 23, 0.7);
}
.auth-card { width: min(440px, 100%); margin: 2rem auto; }
.content-card { width: min(820px, 100%); margin: 2rem auto; }
.auth-card h1, .content-card h1 { margin-top: 0; font-size: 1.45rem; font-weight: 800; }
.value-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .value-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card {
  border-radius: 1rem; border: 1px solid rgba(255, 255, 255, 0.08);
  background: #182234;
  padding: 1.15rem;
}
.value-icon {
  width: 2.5rem; height: 2.5rem; border-radius: .8rem;
  display: grid; place-items: center; margin-bottom: .75rem;
  background: rgba(99,102,241,.12); color: #a5b4fc;
}
.value-card h3 { margin: 0 0 .35rem; font-size: .95rem; color: #fff; }
.value-card p { margin: 0; font-size: .78rem; color: #94a3b8; }
.faq-item { padding: .9rem 0; border-bottom: 1px solid #1e293b; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin: 0 0 .35rem; font-size: .9rem; font-weight: 600; color: #fff; }
.faq-item p { margin: 0; font-size: .78rem; color: #94a3b8; }

@media (prefers-reduced-motion: reduce) {
  .home-tools-wrap .tool-tile {
    animation: none !important;
    translate: none !important;
  }
}

/* Tool page */
.crumbs { font-size: .8rem; color: #94a3b8; margin: .9rem 0 1rem; }
.tool-h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: #fff; }
.tool-intro { margin: .5rem 0 0; color: #94a3b8; font-size: .9rem; max-width: 48rem; line-height: 1.55; }
.tool-summary { margin: .4rem 0 1.1rem; color: #94a3b8; font-size: .88rem; max-width: 48rem; line-height: 1.55; }
.workspace {
  margin-top: 1.2rem; border-radius: 1.25rem; border: 1px solid #2a364c;
  background: linear-gradient(180deg, #121a2b 0%, #0e1524 100%); padding: 1rem;
  box-shadow: var(--shadow-card);
}
@media (min-width: 640px) { .workspace { padding: 1.4rem; } }
.feature-grid { display: grid; gap: .65rem; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature-item { display: flex; align-items: center; gap: .65rem; font-size: .85rem; color: #cbd5e1; }
.check {
  width: 1.25rem; height: 1.25rem; border-radius: 999px; flex-shrink: 0;
  display: grid; place-items: center; background: rgba(16,185,129,.15); color: #34d399; font-size: .7rem;
}
.trust-2 { display: grid; gap: .85rem; margin-top: 1rem; }
@media (min-width: 640px) { .trust-2 { grid-template-columns: 1fr 1fr; } }
.trust-box { border-radius: 1rem; border: 1px solid #1e293b; background: rgba(2,6,23,.45); padding: 1rem; }
.trust-box strong { display: flex; align-items: center; gap: .4rem; font-size: .85rem; margin-bottom: .25rem; color: #fff; }
.trust-box p { margin: 0; font-size: .72rem; color: #94a3b8; }
.steps { display: grid; gap: .65rem; counter-reset: step; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: .75rem;
  border: 1px solid #1e293b; border-radius: 1rem; padding: .85rem 1rem; background: rgba(2,6,23,.35);
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 1.5rem; height: 1.5rem; border-radius: 999px;
  display: grid; place-items: center; background: rgba(99,102,241,.15); color: #a5b4fc;
  font-size: .75rem; font-weight: 700;
}
details.faq-acc {
  border: 1px solid #1e293b; border-radius: .85rem;
  padding: .75rem 1rem; background: rgba(2,6,23,.35); margin-bottom: .5rem;
}
details.faq-acc summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: #fff; }

.dropzone {
  border: 2px dashed rgba(99,102,241,.45); border-radius: 1.25rem; padding: 2.5rem 1.5rem;
  text-align: center; background: radial-gradient(circle at center, rgba(99,102,241,.09) 0%, rgba(2,6,23,.4) 100%);
  cursor: pointer; transition: all .2s ease;
}
.dropzone:hover { border-color: #38bdf8; background: radial-gradient(circle at center, rgba(56,189,248,.12) 0%, rgba(2,6,23,.5) 100%); transform: translateY(-1px); }
.dropzone.dragover { background: rgba(99,102,241,.18); border-color: #818cf8; transform: scale(1.01); }
.dropzone input { display: none; }
.controls { display: grid; gap: .85rem; margin-top: 1rem; }
.controls label { display: grid; gap: .35rem; font-weight: 600; font-size: .85rem; color: #e2e8f0; }
.controls input[type="text"], .controls input[type="email"], .controls input[type="password"],
.controls input[type="number"], .controls input[type="search"], .controls select, .controls textarea {
  width: 100%; border: 1px solid #334155; border-radius: .75rem;
  padding: .65rem .8rem; background: #020617; color: #f8fafc;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.controls input[type="text"]:focus, .controls input[type="email"]:focus, .controls input[type="password"]:focus,
.controls input[type="number"]:focus, .controls input[type="search"]:focus, .controls select:focus, .controls textarea:focus {
  outline: none; border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,.2);
}
.controls textarea { min-height: 140px; resize: vertical; }
.progress { height: 9px; background: #1e293b; border-radius: 999px; overflow: hidden; margin-top: .75rem; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#22d3ee,#6366f1); transition: width .25s ease-out; }
.result-box { margin-top: 1rem; display: grid; gap: .65rem; }
.file-list { display: grid; gap: .45rem; margin-top: .75rem; text-align: left; }
.file-item {
  display: flex; justify-content: space-between; gap: .75rem; align-items: center;
  padding: .65rem .85rem; border-radius: .75rem; background: #020617; border: 1px solid #1e293b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25); transition: border-color .15s ease;
}
.file-item:hover { border-color: #334155; }
.form-stack { display: grid; gap: .85rem; }
.alert { margin: 1rem auto; width: min(80rem, calc(100% - 1.5rem)); padding: .75rem 1rem; border-radius: .75rem; font-weight: 500; font-size: .875rem; }
.alert-success { background: rgba(16,185,129,.12); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.alert-error { background: rgba(244,63,94,.12); color: #fb7185; border: 1px solid rgba(244,63,94,.3); }
.muted { color: #94a3b8; }
.small { font-size: .8rem; }

.blog-index {
  position: relative;
  padding: 1.75rem 0 3.25rem;
  overflow: hidden;
}
.blog-index > .container-7xl {
  position: relative;
  z-index: 1;
}
.blog-particles {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  margin-bottom: -100vh;
  pointer-events: none !important;
  z-index: 0;
  overflow: hidden;
  opacity: .85;
}
.blog-particles canvas {
  display: block;
  width: 100% !important;
  height: 100vh !important;
  pointer-events: none !important;
}

.blog-hero {
  display: grid; gap: 1.25rem; align-items: end;
  margin-bottom: 1.35rem;
  padding: 1.35rem 1.35rem 1.45rem;
  border-radius: 1.35rem;
  border: 1px solid #2a364c;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(99,102,241,.18), transparent 55%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(34,211,238,.1), transparent 50%),
    linear-gradient(180deg, #121a2b 0%, #0e1524 100%);
  box-shadow: var(--shadow-card);
}
@media (min-width: 860px) {
  .blog-hero { grid-template-columns: 1fr minmax(16rem, 22rem); gap: 1.5rem; }
}
.blog-kicker {
  display: inline-flex; align-items: center; gap: .4rem;
  margin: 0 0 .55rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #a5b4fc;
}
.blog-kicker svg { opacity: .9; }
.blog-hero h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; color: #fff;
}
.blog-hero-lead {
  margin: .55rem 0 0; max-width: 36rem; color: #94a3b8;
  font-size: .92rem; line-height: 1.55;
}
.blog-hero-stats {
  display: flex; flex-wrap: wrap; gap: .65rem .9rem; margin-top: 1rem;
}
.blog-hero-stats span {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 600; color: #cbd5e1;
}
.blog-hero-stats svg { color: #818cf8; }

.blog-search {
  display: flex; align-items: center; gap: .45rem;
  padding: .4rem; border-radius: 999px;
  border: 1px solid #334155; background: rgba(15,23,42,.72);
}
.blog-search-icon {
  display: grid; place-items: center; padding-left: .65rem; color: #64748b;
}
.blog-search input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  color: #e2e8f0; font: inherit; font-size: .875rem; padding: .45rem .2rem;
  outline: none;
}
.blog-search input::placeholder { color: #64748b; }
.blog-search .btn { border-radius: 999px; padding-inline: 1rem; }

.blog-filters {
  display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.15rem;
}
.blog-filter {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .75rem; border-radius: 999px;
  border: 1px solid #2a364c; background: #121a2b;
  color: #cbd5e1; font-size: .78rem; font-weight: 650;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.blog-filter em {
  font-style: normal; font-size: .68rem; font-weight: 700;
  padding: .1rem .4rem; border-radius: 999px;
  background: rgba(148,163,184,.12); color: #94a3b8;
}
.blog-filter:hover { border-color: #475569; color: #fff; background: #182234; }
.blog-filter.is-active {
  border-color: rgba(129,140,248,.55);
  background: rgba(99,102,241,.16); color: #e0e7ff;
}
.blog-filter.is-active em { background: rgba(99,102,241,.28); color: #c7d2fe; }
.blog-filter-image.is-active { border-color: rgba(96,165,250,.5); background: rgba(59,130,246,.14); color: #bfdbfe; }
.blog-filter-image.is-active em { background: rgba(59,130,246,.28); color: #dbeafe; }
.blog-filter-pdf.is-active { border-color: rgba(251,113,133,.5); background: rgba(244,63,94,.14); color: #fecdd3; }
.blog-filter-pdf.is-active em { background: rgba(244,63,94,.28); color: #ffe4e6; }
.blog-filter-text.is-active { border-color: rgba(52,211,153,.5); background: rgba(16,185,129,.14); color: #a7f3d0; }
.blog-filter-text.is-active em { background: rgba(16,185,129,.28); color: #d1fae5; }
.blog-filter-converter.is-active { border-color: rgba(251,191,36,.5); background: rgba(245,158,11,.14); color: #fde68a; }
.blog-filter-converter.is-active em { background: rgba(245,158,11,.28); color: #fef3c7; }

.blog-results-meta {
  margin: 0 0 1rem; font-size: .8rem; color: #94a3b8;
}
.blog-results-meta a { color: #a5b4fc; font-weight: 600; }
.blog-results-meta a:hover { color: #c7d2fe; }

.blog-grid {
  display: grid; gap: 1.35rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  perspective: 1200px;
}

/* Anti-Gravity Levitation Keyframes (Hardware GPU Compositor Only - ZERO Repaint Overhead) */
@keyframes tdLevitateA {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}

@keyframes tdLevitateB {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -9px;
  }
}

@keyframes tdLevitateC {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -5px;
  }
}

.blog-card {
  position: relative;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 1.15rem;
  overflow: hidden;
  background: linear-gradient(180deg, #121a2b 0%, #0c1220 100%);
  display: flex;
  flex-direction: column;
  box-shadow:
    0 14px 34px -8px rgba(2, 6, 23, 0.85),
    0 6px 20px -4px rgba(99, 102, 241, 0.22),
    0 0 1px 1px rgba(129, 140, 248, 0.2),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  will-change: transform;
  animation: tdLevitateA 4.8s ease-in-out infinite;
  animation-delay: -0.6s;
  transition: border-color .22s ease, box-shadow .25s ease;
}

/* Staggered organic floating delays */
.blog-card:nth-child(2n) {
  animation-name: tdLevitateB;
  animation-duration: 5.6s;
  animation-delay: -2.3s;
}
.blog-card:nth-child(3n) {
  animation-name: tdLevitateC;
  animation-duration: 4.2s;
  animation-delay: -3.5s;
}
.blog-card:nth-child(4n) {
  animation-name: tdLevitateA;
  animation-duration: 6.0s;
  animation-delay: -1.2s;
}
.blog-card:nth-child(5n) {
  animation-name: tdLevitateB;
  animation-duration: 4.6s;
  animation-delay: -4.1s;
}
.blog-card:nth-child(6n) {
  animation-name: tdLevitateC;
  animation-duration: 5.2s;
  animation-delay: -2.7s;
}

/* Pause floating on hover/focus so cursor coordinates stay stable during 3D tilt */
.blog-card:hover,
.blog-card:focus-within {
  animation-play-state: paused;
  border-color: rgba(165, 180, 252, 0.65);
  box-shadow:
    0 28px 56px -12px rgba(2, 6, 23, 0.95),
    0 0 42px -4px rgba(129, 140, 248, 0.45),
    0 0 18px rgba(56, 189, 248, 0.3),
    0 0 1px 1.5px rgba(199, 210, 254, 0.5),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
}

/* Category-specific neon glow hints on hover */
.blog-card:has(.blog-tag-image):hover {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow:
    0 28px 56px -12px rgba(2, 6, 23, 0.95),
    0 0 42px -4px rgba(59, 130, 246, 0.45),
    0 0 18px rgba(96, 165, 250, 0.3),
    0 0 1px 1.5px rgba(191, 219, 254, 0.5),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
}
.blog-card:has(.blog-tag-pdf):hover {
  border-color: rgba(251, 113, 133, 0.65);
  box-shadow:
    0 28px 56px -12px rgba(2, 6, 23, 0.95),
    0 0 42px -4px rgba(244, 63, 94, 0.42),
    0 0 18px rgba(251, 113, 133, 0.28),
    0 0 1px 1.5px rgba(254, 205, 211, 0.5),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
}
.blog-card:has(.blog-tag-text):hover {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow:
    0 28px 56px -12px rgba(2, 6, 23, 0.95),
    0 0 42px -4px rgba(16, 185, 129, 0.42),
    0 0 18px rgba(52, 211, 153, 0.28),
    0 0 1px 1.5px rgba(167, 243, 208, 0.5),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
}
.blog-card:has(.blog-tag-converter):hover {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow:
    0 28px 56px -12px rgba(2, 6, 23, 0.95),
    0 0 42px -4px rgba(245, 158, 11, 0.42),
    0 0 18px rgba(251, 191, 36, 0.28),
    0 0 1px 1.5px rgba(253, 230, 138, 0.5),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
}

.blog-card-media {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: #0b1220;
  transform: translateZ(12px);
  transform-style: preserve-3d;
}
.blog-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-media.is-fallback {
  display: grid; place-items: center;
}
.blog-card-media-image { background: linear-gradient(135deg, #1e3a5f, #1e1b4b); }
.blog-card-media-pdf { background: linear-gradient(135deg, #4c0519, #3b0764); }
.blog-card-media-text { background: linear-gradient(135deg, #064e3b, #134e4a); }
.blog-card-media-converter { background: linear-gradient(135deg, #78350f, #451a03); }
.blog-card-media-guides,
.blog-card-media-default { background: linear-gradient(135deg, #312e81, #0f172a); }
.blog-card-fallback-icon { color: rgba(255,255,255,.55); }

.blog-tag {
  position: absolute; left: .75rem; top: .75rem;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .55rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .01em;
  backdrop-filter: blur(8px); border: 1px solid transparent;
  transform: translateZ(26px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.blog-tag-image { background: rgba(30,58,138,.82); color: #bfdbfe; border-color: rgba(96,165,250,.35); }
.blog-tag-pdf { background: rgba(136,19,55,.82); color: #fecdd3; border-color: rgba(251,113,133,.35); }
.blog-tag-text { background: rgba(6,78,59,.82); color: #a7f3d0; border-color: rgba(52,211,153,.35); }
.blog-tag-converter { background: rgba(120,53,15,.82); color: #fde68a; border-color: rgba(251,191,36,.35); }
.blog-tag-guides, .blog-tag-tips, .blog-tag-news, .blog-tag-default {
  background: rgba(49,46,129,.82); color: #c7d2fe; border-color: rgba(129,140,248,.35);
}

.blog-card-body {
  padding: 1rem 1.05rem 1.1rem; display: grid; gap: .5rem; flex: 1;
  transform-style: preserve-3d;
}
.blog-card-body h3 {
  margin: 0; font-size: 1.02rem; font-weight: 750; color: #fff;
  letter-spacing: -.015em; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transform: translateZ(18px);
}
.blog-card-body > p {
  margin: 0; font-size: .8rem; color: #94a3b8; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  transform: translateZ(10px);
}
.blog-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .75rem;
  margin-top: auto; padding-top: .35rem;
  font-size: .72rem; color: #64748b; font-weight: 600;
  transform: translateZ(14px);
}
.blog-card-meta > span { display: inline-flex; align-items: center; gap: .28rem; }
.blog-card-meta svg { opacity: .85; }
.blog-card-cta {
  margin-left: auto; color: #a5b4fc; font-weight: 700;
  transform: translateZ(20px);
}
.blog-card:hover .blog-card-cta { color: #c7d2fe; }

/* Accessibility fallback */
@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .blog-card:nth-child(n) {
    animation: none !important;
    translate: none !important;
  }
}

.blog-empty {
  text-align: center; padding: 3rem 1rem;
  border: 1px dashed #334155; border-radius: 1.15rem; color: #94a3b8;
}
.blog-empty svg { color: #64748b; margin-bottom: .75rem; }
.blog-empty h2 { margin: 0 0 .35rem; color: #e2e8f0; font-size: 1.15rem; }
.blog-empty .btn { margin-top: 1rem; }

.blog-pager {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  margin-top: 1.75rem;
}
.blog-pager .btn { display: inline-flex; align-items: center; gap: .25rem; }
.blog-page {
  width: 2.15rem; height: 2.15rem; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid #2a364c; background: #121a2b;
  color: #cbd5e1; font-size: .8rem; font-weight: 700;
}
.blog-page:hover { border-color: #475569; color: #fff; }
.blog-page.is-active {
  border-color: transparent;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  color: #fff;
}

/* Blog post (single article) */
.blog-post {
  padding: 1.75rem 0 3rem;
}
.blog-post-layout {
  width: min(80rem, calc(100% - 1.75rem));
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 1024px) {
  .blog-post-layout {
    grid-template-columns: minmax(0, 1fr) 18.5rem;
    gap: 1.75rem;
  }
}
.blog-post-main { min-width: 0; }
.blog-post-crumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 1rem;
  font-size: .8rem;
  color: #94a3b8;
}
.blog-post-crumb a { color: #cbd5e1; font-weight: 500; }
.blog-post-crumb a:hover { color: #a5b4fc; }
.blog-post-header { margin: 0 0 1.35rem; }
.blog-post-header h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  color: #fff;
  text-align: left;
}
.blog-post-meta {
  margin: .75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  color: #94a3b8;
}
.blog-post-excerpt {
  margin: 1rem 0 0;
  max-width: none;
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.65;
  text-align: left;
}
.blog-post-hero {
  margin: 0 0 1.5rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #1e293b;
  background: #0f172a;
}
.blog-post-hero img {
  display: block;
  width: 100%;
  height: auto;
}
.blog-post-body {
  margin: 0;
  padding: 1.35rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid #1e293b;
  background: #0f172a;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.blog-post-body > *:first-child { margin-top: 0; }
.blog-post-body > *:last-child { margin-bottom: 0; }

/* Blog sidebar */
.blog-sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}
@media (min-width: 1024px) {
  .blog-sidebar {
    position: sticky;
    top: 5rem;
  }
}
.blog-side-card {
  border: 1px solid #1e293b;
  border-radius: 1rem;
  background: #0f172a;
  padding: 1rem;
}
.blog-side-card h3 {
  margin: 0 0 .75rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #e2e8f0;
}
.blog-side-search {
  display: flex;
  gap: .4rem;
}
.blog-side-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #334155;
  border-radius: .65rem;
  background: #020617;
  color: #f8fafc;
  padding: .5rem .7rem;
  font: inherit;
  font-size: .85rem;
}
.blog-side-search input:focus {
  outline: none;
  border-color: #6366f1;
}
.blog-side-actions {
  display: grid;
  gap: .45rem;
}
.blog-side-actions .btn { width: 100%; justify-content: center; }
.blog-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.blog-side-list a {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .65rem;
  padding: .55rem .6rem;
  border-radius: .65rem;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
}
.blog-side-list a:hover {
  color: #fff;
  background: rgba(99, 102, 241, .1);
  border-color: rgba(99, 102, 241, .28);
}
.blog-side-list a span { min-width: 0; }
.blog-side-list a em {
  flex-shrink: 0;
  font-style: normal;
  font-size: .72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: capitalize;
}
.blog-side-more {
  display: inline-block;
  margin-top: .75rem;
  font-size: .8rem;
  font-weight: 700;
  color: #a5b4fc;
}
.blog-side-more:hover { color: #c7d2fe; }

.prose { max-width: 720px; color: #cbd5e1; line-height: 1.7; text-align: left; }
.blog-post-body.prose { max-width: none; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: #fff;
  line-height: 1.3;
  letter-spacing: -.02em;
  margin: 1.6rem 0 .75rem;
}
.prose h2 { font-size: 1.35rem; }
.prose h3 { font-size: 1.15rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li { margin: .35rem 0; }
.prose a { color: #a5b4fc; }
.prose a:hover { color: #c7d2fe; }
.prose img { max-width: 100%; height: auto; border-radius: .85rem; margin: 1rem 0; border: 1px solid #1e293b; display: block; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.prose th, .prose td { border: 1px solid #334155; padding: .55rem .7rem; text-align: left; }
.prose th { background: #020617; color: #e2e8f0; }
.prose blockquote {
  margin: 1rem 0; padding: .75rem 1rem; border-left: 3px solid #6366f1;
  background: rgba(99,102,241,.08); color: #cbd5e1; border-radius: 0 .75rem .75rem 0;
}
.prose hr { border: 0; border-top: 1px solid #1e293b; margin: 1.5rem 0; }
.prose code { background: #020617; padding: .1rem .35rem; border-radius: .35rem; font-size: .9em; }
.prose pre { background: #020617; padding: 1rem; border-radius: .75rem; overflow: auto; border: 1px solid #1e293b; }
.prose pre code { padding: 0; background: transparent; }

/* Blog index helpers */
.section { padding: 1.75rem 0 2.5rem; }
.section .section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.table-wrap { overflow: auto; border: 1px solid #1e293b; border-radius: .85rem; background: #0f172a; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: .7rem .8rem; border-bottom: 1px solid #1e293b; text-align: left; vertical-align: top; }
th { background: #020617; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; }

.site-footer {
  margin-top: auto; border-top: 1px solid #243044;
  background: #0b1220;
  padding-top: 2.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 3fr; } }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (min-width: 640px) { .footer-links { grid-template-columns: repeat(3, 1fr); } }
.footer-links h3 {
  margin: 0 0 .85rem; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: #e2e8f0;
}
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-links a { font-size: .75rem; font-weight: 500; color: #94a3b8; }
.footer-links a:hover { color: #a5b4fc; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #1e293b;
  display: flex; flex-direction: column; gap: .75rem; align-items: center;
  font-size: .75rem; color: #64748b;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.privacy-note { display: flex; align-items: flex-start; gap: .5rem; margin-top: .85rem; font-size: .75rem; color: #34d399; font-weight: 600; }

@media (min-width: 1024px) {
  .nav-desktop { display: flex; }
  .header-search { min-width: 160px; }
  .header-search-label, .header-search kbd { display: inline; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
  .hero { padding: 3rem 0 3.25rem; }
}

input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; width: 100%; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { background: #334155; height: 6px; border-radius: 9999px; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; height: 18px; width: 18px; border-radius: 50%;
  background: #6366f1; margin-top: -6px; box-shadow: 0 0 0 4px rgba(99,102,241,.2);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Global tool search palette ---------- */
body.td-search-open { overflow: hidden; }
.td-search[hidden] { display: none !important; }
.td-search {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: start center;
  padding: 12vh .75rem 1rem;
}
.td-search-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(6px);
}
.td-search-panel {
  position: relative; z-index: 1;
  width: min(36rem, 100%);
  border-radius: 1rem;
  border: 1px solid #334155;
  background: linear-gradient(180deg, #121a2b 0%, #0e1524 100%);
  box-shadow: 0 24px 64px rgba(2, 6, 23, .65);
  overflow: hidden;
}
.td-search-bar {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid #1e293b;
  color: #94a3b8;
}
.td-search-bar input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  color: #f1f5f9; font: inherit; font-size: 1rem; outline: none;
}
.td-search-bar input::placeholder { color: #64748b; }
.td-search-bar kbd {
  border: 1px solid #334155; border-radius: 6px;
  padding: .15rem .4rem; font-size: .68rem; color: #64748b;
}
.td-search-results {
  max-height: min(22rem, 50vh); overflow: auto; padding: .4rem;
}
.td-search-item {
  width: 100%; display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: .65rem;
  text-align: left; border: 0; cursor: pointer;
  border-radius: .75rem; padding: .7rem .75rem;
  background: transparent; color: #e2e8f0; font: inherit;
}
.td-search-item:hover, .td-search-item.is-active {
  background: rgba(99,102,241,.14);
}
.td-search-item-cat {
  font-size: .65rem; font-weight: 700; padding: .2rem .45rem;
  border-radius: 999px; letter-spacing: .02em;
}
.td-search-cat-image { background: rgba(59,130,246,.18); color: #93c5fd; }
.td-search-cat-pdf { background: rgba(244,63,94,.18); color: #fda4af; }
.td-search-cat-text { background: rgba(16,185,129,.18); color: #6ee7b7; }
.td-search-cat-converter { background: rgba(245,158,11,.18); color: #fcd34d; }
.td-search-item-name { font-size: .9rem; font-weight: 650; }
.td-search-item-go { color: #64748b; font-size: .75rem; }
.td-search-item.is-active .td-search-item-go { color: #a5b4fc; }
.td-search-empty {
  padding: 1.5rem 1rem; text-align: center; color: #94a3b8; font-size: .875rem;
}
.td-search-hint {
  display: flex; flex-wrap: wrap; gap: .75rem 1rem;
  padding: .65rem 1rem; border-top: 1px solid #1e293b;
  font-size: .7rem; color: #64748b;
}
.td-search-hint kbd {
  display: inline-block; border: 1px solid #334155; border-radius: 4px;
  padding: .05rem .3rem; margin-right: .15rem; font-size: .65rem;
}

/* ---------- Live chat widget ---------- */
.td-chat {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 80;
  font-family: inherit;
}
.td-chat-toggle {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .75rem 1.05rem; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #4338ca 100%); color: #fff;
  font-weight: 700; font-size: .875rem;
  box-shadow: 0 10px 28px rgba(79, 70, 229, .42), 0 0 12px rgba(99, 102, 241, .25);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.td-chat-toggle:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(79, 70, 229, .52), 0 0 18px rgba(99, 102, 241, .35);
}
.td-chat-toggle-label { letter-spacing: .01em; }
.td-chat-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  flex-shrink: 0;
  animation: tdChatPulse 2s infinite ease-in-out;
}
@keyframes tdChatPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
.td-chat-badge {
  position: absolute; top: -.25rem; right: -.15rem;
  min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem;
  border-radius: 999px; background: #f43f5e; color: #fff;
  font-size: .65rem; font-weight: 800; line-height: 1.15rem; text-align: center;
}
.td-chat-panel {
  position: absolute; right: 0; bottom: calc(100% + .65rem);
  width: min(22.5rem, calc(100vw - 1.5rem));
  max-height: min(32rem, calc(100vh - 6rem));
  display: flex; flex-direction: column;
  background: #0f172a; border: 1px solid #1e293b; border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(2, 6, 23, .55); overflow: hidden;
}
.td-chat-panel[hidden],
.td-chat-intro[hidden],
.td-chat-messages[hidden],
.td-chat .progress[hidden] {
  display: none !important;
}
.td-chat-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: .9rem 1rem; border-bottom: 1px solid #1e293b; background: #020617;
}
.td-chat-header strong { display: block; color: #f8fafc; font-size: .95rem; }
.td-chat-status { margin: .2rem 0 0; font-size: .72rem; color: #94a3b8; }
.td-chat-close {
  border: 0; background: transparent; color: #94a3b8; cursor: pointer; padding: .2rem; border-radius: .4rem;
}
.td-chat-close:hover { color: #e2e8f0; background: rgba(148,163,184,.12); }
.td-chat-intro { padding: .85rem 1rem 0; }
.td-chat-fields { display: grid; gap: .55rem; margin-top: .65rem; }
.td-chat-fields label { display: grid; gap: .25rem; font-size: .72rem; color: #94a3b8; font-weight: 600; }
.td-chat-fields input {
  width: 100%; padding: .55rem .65rem; border-radius: .65rem;
  border: 1px solid #334155; background: #020617; color: #e2e8f0; font-size: .85rem;
}
.td-chat-messages {
  flex: 1; overflow: auto; padding: .85rem 1rem; display: flex; flex-direction: column; gap: .55rem;
  min-height: 10rem; max-height: 16rem;
}
.td-chat-bubble {
  max-width: 88%; padding: .55rem .7rem; border-radius: .75rem; font-size: .85rem; line-height: 1.45;
}
.td-chat-bubble.is-visitor {
  align-self: flex-end; background: rgba(99,102,241,.22); border: 1px solid rgba(99,102,241,.35); color: #e2e8f0;
}
.td-chat-bubble.is-admin {
  align-self: flex-start; background: #020617; border: 1px solid #334155; color: #cbd5e1;
}
.td-chat-bubble-label {
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #94a3b8; margin-bottom: .2rem;
}
.td-chat-form {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: end;
  padding: .75rem 1rem 1rem; border-top: 1px solid #1e293b; background: #0b1220;
}
.td-chat-form textarea {
  width: 100%; resize: none; min-height: 2.6rem; max-height: 6rem;
  padding: .55rem .65rem; border-radius: .65rem;
  border: 1px solid #334155; background: #020617; color: #e2e8f0; font: inherit; font-size: .85rem;
}
.td-chat-hp {
  position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important;
}
@media (max-width: 480px) {
  .td-chat { right: .75rem; bottom: .75rem; }
  .td-chat-toggle-label { display: none; }
  .td-chat-panel { width: calc(100vw - 1.5rem); }
}

/* ==========================================================================
   Tool Modern UI Enhancements (Visual Canvas, Cropper, Watermark, PDF Grid)
   ========================================================================== */
.canvas-workspace {
  position: relative;
  margin: 1rem 0;
  padding: 1rem;
  background:
    linear-gradient(45deg, #162032 25%, transparent 25%),
    linear-gradient(-45deg, #162032 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #162032 75%),
    linear-gradient(-45deg, transparent 75%, #162032 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  background-color: #0b1120;
  border: 1px solid #23354d;
  border-radius: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  min-height: 220px;
  max-height: 580px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.4);
}
.canvas-workspace canvas,
.canvas-workspace img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* Interactive Crop Container */
.crop-container {
  position: relative;
  display: inline-block;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: crosshair;
}
.crop-container img {
  display: block;
  max-width: 100%;
  max-height: 500px;
  pointer-events: none;
}
.crop-overlay-dark {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  pointer-events: none;
}
.crop-box {
  position: absolute;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.65), 0 0 20px rgba(56, 189, 248, 0.35);
  border: 2px solid #38bdf8;
  cursor: move;
  box-sizing: border-box;
}
.crop-box::before,
.crop-box::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.crop-box::before {
  border-top: 1px dashed rgba(255,255,255,0.4);
  border-bottom: 1px dashed rgba(255,255,255,0.4);
  top: 33.333%;
  bottom: 33.333%;
}
.crop-box::after {
  border-left: 1px dashed rgba(255,255,255,0.4);
  border-right: 1px dashed rgba(255,255,255,0.4);
  left: 33.333%;
  right: 33.333%;
}
.crop-handle {
  position: absolute;
  width: 11px;
  height: 11px;
  background: #ffffff;
  border: 2px solid #0284c7;
  border-radius: 2px;
  box-sizing: border-box;
  z-index: 10;
}
.crop-handle.handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-handle.handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-handle.handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-handle.handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.crop-handle.handle-n  { top: -6px; left: calc(50% - 5px); cursor: ns-resize; }
.crop-handle.handle-s  { bottom: -6px; left: calc(50% - 5px); cursor: ns-resize; }
.crop-handle.handle-w  { top: calc(50% - 5px); left: -6px; cursor: ew-resize; }
.crop-handle.handle-e  { top: calc(50% - 5px); right: -6px; cursor: ew-resize; }

.crop-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255,255,255,0.15);
  color: #38bdf8;
  font-size: .72rem;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  padding: .2rem .5rem;
  border-radius: .35rem;
  pointer-events: none;
  z-index: 5;
}

/* Pills and Tool Bars */
.preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .5rem 0;
}
.pill-btn {
  border: 1px solid #334155;
  background: #0f172a;
  color: #94a3b8;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.pill-btn:hover {
  border-color: #64748b;
  color: #f1f5f9;
}
.pill-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Position 3x3 Grid */
.pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 6px;
  margin-top: .4rem;
}
.pos-btn {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: .5rem;
  color: #94a3b8;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.pos-btn:hover { border-color: #64748b; color: #fff; }
.pos-btn.active {
  background: #38bdf8;
  color: #04121d;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* PDF Page Grid */
.pdf-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.pdf-page-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: .85rem;
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: transform .2s, border-color .2s;
}
.pdf-page-card:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
}
.pdf-page-card .thumb-wrap {
  position: relative;
  background: #020617;
  border-radius: .5rem;
  overflow: hidden;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-page-card .thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pdf-page-card .page-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255,255,255,0.15);
  color: #cbd5e1;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: .3rem;
}
.pdf-page-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  color: #94a3b8;
}
.zip-download-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}
.zip-download-banner strong {
  display: block;
  font-size: 1.05rem;
  color: #f8fafc;
}
.zip-download-banner span {
  font-size: .85rem;
  color: #94a3b8;
}

/* Document Word Preview */
.doc-preview-box {
  background: #ffffff;
  color: #1e293b;
  border-radius: .75rem;
  padding: 2.5rem 3rem;
  max-height: 480px;
  overflow-y: auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  font-size: .95rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  margin-top: 1rem;
}
.doc-preview-box h1, .doc-preview-box h2, .doc-preview-box h3 {
  color: #0f172a;
  margin-top: 1.2rem;
  margin-bottom: .4rem;
}
.doc-preview-box p {
  margin-bottom: .8rem;
}
.doc-page-divider {
  border: 0;
  border-top: 1px dashed #cbd5e1;
  margin: 1.5rem 0;
  position: relative;
  text-align: center;
}
.doc-page-divider::before {
  content: attr(data-page);
  position: relative;
  top: -10px;
  background: #f1f5f9;
  padding: 2px 10px;
  font-size: .75rem;
  color: #64748b;
  border-radius: 999px;
}

/* ---------- Blog Article Topic Cluster Internal Linking & Companion Guides ---------- */
.article-companion-box {
  margin-top: 2.75rem;
  padding: 1.75rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.7);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(2, 6, 23, 0.95) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.article-companion-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.article-companion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 1.1rem;
}
.article-companion-header h3 {
  margin: 0 !important;
  font-size: 1.2rem !important;
  font-weight: 750 !important;
  color: #f8fafc !important;
  letter-spacing: -0.015em;
}
.article-companion-intro {
  margin: 0 0 1.25rem !important;
  font-size: 0.88rem !important;
  color: #94a3b8 !important;
  line-height: 1.5;
}
.article-companion-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .article-companion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.companion-card {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 0.75rem;
  text-decoration: none !important;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.companion-card:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}
.companion-card-title {
  color: #e2e8f0;
  font-weight: 650;
  font-size: 0.88rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.companion-card:hover .companion-card-title {
  color: #a5b4fc;
}
.companion-card-desc {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.companion-tool-banner {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.companion-tool-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.companion-tool-info strong {
  color: #f1f5f9;
  font-size: 0.92rem;
  display: block;
}
.companion-tool-info span {
  color: #94a3b8;
  font-size: 0.78rem;
}

/* ---------- 2026 Blog Upgrades: Freshness, Copy Code, FAQs, and Author Bio ---------- */
.badge-freshness {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #38bdf8;
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.copy-code-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #334155;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 5;
}
.copy-code-btn:hover {
  color: #fff;
  background: #1e293b;
  border-color: #6366f1;
}
.copy-code-btn.copied {
  color: #10b981;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

/* FAQ Accordion Section */
.blog-faq-section {
  margin: 2.75rem 0 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid #1e293b;
}
.faq-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.faq-head h2 {
  margin: 0 !important;
  font-size: 1.35rem !important;
  font-weight: 750 !important;
  color: #fff !important;
}
.faq-accordion-group {
  display: grid;
  gap: 0.75rem;
}
.faq-item {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
}
.faq-item[open] {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(15, 23, 42, 0.95);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  font-weight: 650;
  font-size: 0.95rem;
  color: #f1f5f9;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-arrow {
  color: #64748b;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
  color: #818cf8;
}
.faq-answer {
  padding: 0 1.15rem 1.15rem;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.65;
  border-top: 1px solid rgba(30, 41, 59, 0.6);
  padding-top: 0.85rem;
}
.faq-answer p {
  margin: 0 !important;
}

/* Author E-E-A-T Card */
.blog-author-card {
  margin-top: 2.25rem;
  padding: 1.35rem;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #1e293b;
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
}
.author-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  flex-shrink: 0;
}
.author-details {
  flex: 1;
  min-width: 0;
}
.author-headline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.author-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  color: #fff;
}
.author-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}
.author-role {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #38bdf8;
}
.author-bio {
  margin: 0;
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.55;
}
.author-social-links {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.65rem;
}
.author-social-links a {
  font-size: 0.78rem;
  font-weight: 600;
  color: #818cf8;
  text-decoration: none;
  transition: color 0.15s ease;
}
.author-social-links a:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

/* Language dropdown & RTL support */
.lang-dropdown {
  position: relative;
  display: inline-block;
}
.lang-menu {
  max-height: min(480px, calc(100vh - 100px)) !important;
  overflow-y: auto !important;
}
[dir="rtl"] .lang-menu {
  left: 0 !important;
  right: auto !important;
}
[dir="ltr"] .lang-menu {
  right: 0 !important;
  left: auto !important;
}




