/* ============================================================
   style.css — Fastols Design System
   Updated Primary Color: #2DCC29
   Icons / Tool Icons are explicitly excluded from color changes.
   ============================================================ */

:root {
  /* ---- NEW PRIMARY COLOR ---- */
  --primary: #2DCC29;
  --primary-dark: #2DCC29;
  --primary-50: #EAFAE9;   /* very light tint of #2DCC29 for backgrounds */
  --primary-light: #2DCC29;

  /* ---- NEUTRAL / BASE ---- */
  --ink: #000000;
  --ink-soft: #000000;
  --ink-faint: #000000;
  --bg: #FFFFFF;
  --bg-soft: #F6F7FB;
  --bg-tint: #FBF9F6;
  --border: #E8E9F1;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20,20,43,.06);
  --shadow-md: 0 10px 26px -12px rgba(20,20,43,.16);
  --shadow-lg: 0 26px 54px -18px rgba(20,20,43,.24);
  --font-display: 'Almarai', sans-serif;
  --font-body: 'Almarai', sans-serif;
  --header-h: 76px;
}

/* ===== ADS (disabled) ===== */
.ad-slot { display: none !important; }

/* ===== RESET ===== */
*, ::after, ::before { box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg,#eef0f4 0,#f4f5f8 420px,#f7f8fa 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body > .site-footer,
body > footer { margin-top: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.25;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; }
ul { margin: 0; padding: 0; list-style: none; }
input, textarea { font-family: inherit; }

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

/* ===== ICON ===== */
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  transition: transform .18s, box-shadow .18s, filter .18s, background .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.98); }

/* PRIMARY — uses new green */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(94,143,99,0.5);
}
.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 16px 30px -10px rgba(94,143,99,0.55);
}
.btn-primary:disabled {
  background: #d8dae4;
  color: #9296a8;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--bg-soft);
  color: var(--ink);
}
.btn-ghost:hover { background: #eff0f6; }

.btn-outline {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 17px 36px;
  font-size: 18px;
}

.btn-accent {
  color: #fff;
  box-shadow: 0 14px 28px -12px var(--tint-shadow, rgba(0,0,0,0.35));
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
}
.burger { flex-shrink: 0; }
@media (max-width: 480px) {
  .header-row { gap: 10px; }
  .header-cta { gap: 8px; }
  .lang-switch-btn { padding: 9px 10px; gap: 0; }
  .lang-switch-btn span { display: none; }
  .lang-switch-btn .lang-globe { width: 18px; height: 18px; }
}

/* ---- BRAND (logo) ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #34DA2F, var(--primary) 55%, #21A31D);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(33, 163, 29, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border: none;
  margin: 0;
}
.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: none;
}
.brand small { color: #000; }
.brand-name {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline;
  line-height: 1;
}
.brand-name small {
  font-size: 1em;
  vertical-align: baseline;
}

/* ---- NAV ---- */
.main-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 999px;
  transition: .18s;
}
.main-nav a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.mega-wrap { position: relative; }
.mega-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink-soft);
  background: 0 0;
  border: none;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: .18s;
}
.mega-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform .2s;
}
.mega-trigger:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.mega-trigger[aria-expanded="true"] {
  background: var(--primary-50);
  color: var(--primary-dark);
}
.mega-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ---- MEGA MENU ---- */
.mega-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 55;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: .2s;
  max-height: calc(100vh - var(--header-h));
  overflow: auto;
}
.mega-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 20px;
  max-width: 640px;
  margin-inline: auto;
}
.mega-cat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: .15s;
  border: 1.5px solid transparent;
}
.mega-cat-card:hover {
  background: var(--bg-soft);
  border-color: var(--border);
}
.mega-cat-card .tag-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mega-cat-card .tag-ico svg {
  width: 18px;
  height: 18px;
}
.mega-cat-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mega-cat-card-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-cat-card small {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
}
@media (max-width: 560px) {
  .mega-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- NAV SEARCH ---- */
.nav-search {
  display: none;
  align-items: center;
  gap: 9px;
  flex: 1;
  max-width: 340px;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--ink-faint);
  position: relative;
}
.nav-search:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-50);
}
.nav-search svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.nav-search input {
  flex: 1;
  border: none;
  background: 0 0;
  outline: 0;
  font-size: 14px;
  color: var(--ink);
}
.search-suggest {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  max-height: 360px;
  overflow: auto;
  z-index: 60;
}
.search-suggest.open { display: block; }
.search-suggest a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.search-suggest a:hover { background: var(--bg-soft); }
.search-suggest .tag-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.search-suggest .tag-ico svg {
  width: 15px;
  height: 15px;
}
.search-empty {
  padding: 14px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13.5px;
}

/* ---- HEADER CTA ---- */
.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-inline-start: auto;
}

/* Language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}
.lang-switch:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.mobile-panel-top .lang-switch {
  margin-inline-start: 8px;
  padding: 8px 14px;
  font-size: 13px;
}

/* Burger */
.burger {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
}
.burger svg {
  width: 19px;
  height: 19px;
}

/* Mobile panel */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(15,17,32,.32);
  z-index: 48;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s;
}
.mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.mobile-panel {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: #fff;
  z-index: 49;
  transform: translateX(100%);
  transition: transform .28s;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 40px;
}
html[dir=rtl] .mobile-panel { transform: translateX(-100%); }
.mobile-panel.open,
html[dir=rtl] .mobile-panel.open { transform: translateX(0); }

@media (min-width: 900px) {
  .main-nav,
  .nav-search { display: flex; }
  .main-nav { margin-inline-start: auto; }
  .header-cta { margin-inline-start: 0; }
  .burger,
  .mobile-backdrop,
  .mobile-panel { display: none; }
}

.mobile-panel-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.mobile-panel-top .m-search { min-width: 0; }
.mobile-panel .m-search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 12px 16px;
  flex: 1;
}
.mobile-panel .m-search svg {
  width: 17px;
  height: 17px;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.mobile-panel .m-search input {
  border: none;
  background: 0 0;
  outline: 0;
  flex: 1;
  font-size: 14.5px;
  min-width: 0;
}
.mobile-close {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mobile-close svg {
  width: 17px;
  height: 17px;
  color: var(--ink-soft);
}
.mobile-cat-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 8px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.mobile-cat-link:hover { background: var(--bg-soft); }
.mobile-cat-link .tag-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mobile-cat-link .tag-ico svg {
  width: 18px;
  height: 18px;
}
.mobile-cat-link small {
  display: block;
  color: var(--ink-faint);
  font-weight: 500;
  font-size: 12.5px;
  margin-top: 2px;
}
.mobile-cat-link span:nth-of-type(2) { flex: 1; }
.mobile-cat-link .acc-chevron {
  flex-shrink: 0;
  color: var(--ink-faint);
  display: flex;
}
.mobile-cat-link .acc-chevron svg {
  width: 15px;
  height: 15px;
}
html[dir=rtl] .mobile-cat-link .acc-chevron svg { transform: scaleX(-1); }

/* ===== HERO ===== */
.hero {
  padding: 60px 0 34px;
  text-align: center;
  background: var(--bg);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 13.5px;
  color: #000;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 17px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(32px, 5.6vw, 58px);
  font-weight: 900;
  letter-spacing: -1.2px;
  line-height: 1.14;
  color: #000;
  max-width: 860px;
  margin-inline: auto;
}
.hero h1 span { color: #000; }
.hero p {
  margin-top: 16px;
  color: #000;
  font-size: clamp(16px, 2.1vw, 20px);
  max-width: 620px;
  margin-inline: auto;
  line-height: 1.65;
}
.hero-search {
  max-width: 640px;
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  box-shadow: var(--shadow-sm);
}
html[dir=rtl] .hero-search { padding: 8px 22px 8px 8px; }
.hero-search svg {
  width: 20px;
  height: 20px;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.hero-search input {
  flex: 1;
  border: none;
  outline: 0;
  font-size: 16px;
  background: 0 0;
}
.hero-search button { flex-shrink: 0; }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 13.5px;
  color: #000;
  transition: .2s;
  box-shadow: var(--shadow-sm);
}
.pill svg {
  width: 15px;
  height: 15px;
  color: var(--pill-c, #000);
  transition: .2s;
}
.pill:hover {
  border-color: var(--pill-c, var(--primary));
  background: var(--pill-c, var(--primary));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pill:hover svg { color: #fff; }

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-bottom: 32px;
}
.filter-tab {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: .18s;
}
.filter-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}
/* active tab uses primary */
.filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== SECTIONS ===== */
.section { padding: 52px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 900;
  color: var(--ink);
}
.section-head p {
  color: var(--ink-soft);
  margin-top: 6px;
  font-size: 14px;
}

/* ===== TOOL GRID ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  direction: inherit;
}
html[dir=rtl] .tool-grid,
html[dir=rtl] .mega-cat-grid,
html[dir=rtl] .features,
html[dir=rtl] .file-list,
html[dir=rtl] .compress-levels,
html[dir=rtl] .split-modes,
html[dir=rtl] .calc-grid,
html[dir=rtl] .row2,
html[dir=rtl] .stat-grid,
html[dir=rtl] .pw-opts,
html[dir=rtl] .qr-dl-grid,
html[dir=rtl] .howto-list,
html[dir=rtl] .related-grid,
html[dir=rtl] .footer-grid,
html[dir=rtl] .home-articles-grid,
html[dir=rtl] .blog-grid {
  direction: rtl;
}
@media (min-width: 640px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
@media (min-width: 1024px) {
  .tool-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}
@media (min-width: 1280px) {
  .tool-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; }
}

/* ---- TOOL CARD ---- */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 26px 22px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s, border-color .2s;
}
.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -18px rgba(20,20,43,.28);
}
/* tool icons: explicitly excluded from primary color change */
.tool-ico {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--c2) 60%, transparent);
}
.tool-ico svg {
  width: 24px;
  height: 24px;
}
.tool-card h3 {
  font-size: 20.5px;
  font-weight: 800;
  color: #000;
  line-height: 1.4;
}
.tool-card .desc {
  font-size: 15px;
  color: rgba(0,0,0,0.7);
  line-height: 1.7;
  flex: 1;
}
.tool-card .row-badges {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
}
html[dir=rtl] .tool-card .row-badges {
  left: auto;
  right: 16px;
}
.badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
}
.badge.new { background: #16a34a; }
.badge.hot { background: var(--primary); }
.badge.soon { background: #d97706; }
.badge.maint { background: #64748b; }

.tool-card .go {
  font-size: 13.5px;
  font-weight: 700;
  color: #000;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.tool-card .go svg {
  width: 13px;
  height: 13px;
  color: var(--primary-dark);
  transition: transform .18s;
}
.tool-card:hover .go svg { transform: translateX(-3px); }
html[dir=rtl] .tool-card:hover .go svg { transform: scaleX(-1) translateX(-3px); }

/* ---- CATEGORY BAND ---- */
.cat-band {
  border-radius: var(--radius-xl);
  padding: 0;
  margin-bottom: 46px;
  border: none;
  background: transparent;
}
.cat-band-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.cat-ico-lg {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--c2) 60%, transparent);
  flex-shrink: 0;
}
.cat-ico-lg svg {
  width: 28px;
  height: 28px;
}
.cat-band-head h3 {
  font-size: 20px;
  font-weight: 900;
  color: #000;
}
.cat-band-head p {
  color: rgba(0,0,0,0.66);
  font-size: 13.5px;
  margin-top: 4px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.chip {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: .18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff;
  transform: translateY(-2px);
}

/* ---- FEATURES ---- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .features { grid-template-columns: repeat(4, 1fr); }
}
.feature-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-card .f-ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.feature-card .f-ico svg {
  width: 22px;
  height: 22px;
}
.feature-card h3 {
  font-size: 15.5px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #000;
}
.feature-card p {
  font-size: 13.3px;
  color: rgba(0,0,0,0.68);
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--ink);
  color: #c7c9d6;
  padding: 56px 0 24px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
.footer-brand p {
  font-size: 13.5px;
  line-height: 1.8;
  margin-top: 14px;
  color: #9ea1b5;
  max-width: 280px;
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 13.3px;
  color: #9ea1b5;
  transition: .18s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 12.5px;
  color: #8F92B0;
}
.footer-bottom a { color: #8F92B0; }
.footer-bottom a:hover { color: #fff; }

/* ===== TOOL FOOTER ===== */
.tool-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  margin-top: 10px;
}
body > .tool-footer { margin-top: auto; }
.tool-footer .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-faint);
}
.tool-footer a.home-link {
  font-weight: 800;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tool-footer a.home-link:hover { color: var(--primary); }
.tool-footer a.home-link svg {
  width: 15px;
  height: 15px;
}

/* ===== TOOL PAGE HERO ===== */
.tool-page-hero { padding: 40px 0 18px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-faint);
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.breadcrumb a {
  font-weight: 700;
  color: var(--ink-soft);
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb svg {
  width: 12px;
  height: 12px;
}
html[dir=rtl] .breadcrumb svg,
html[dir=rtl] .tool-card .go svg { transform: scaleX(-1); }
.breadcrumb .current {
  color: var(--ink);
  font-weight: 700;
}

.tool-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 8px;
}
.tool-intro .cat-ico-lg {
  margin: 0 auto 18px;
  width: 64px;
  height: 64px;
  border-radius: 18px;
}
.tool-intro .cat-ico-lg svg {
  width: 30px;
  height: 30px;
}
.tool-intro.in-sidebar {
  text-align: start;
  max-width: none;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.tool-intro.in-sidebar .cat-ico-lg {
  margin: 0 0 12px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.tool-intro.in-sidebar .cat-ico-lg svg {
  width: 20px;
  height: 20px;
}
.tool-intro.in-sidebar h1 { font-size: 17px; }
.tool-intro.in-sidebar p {
  font-size: 12.5px;
  margin-top: 6px;
}
.tool-intro h1 {
  font-size: clamp(27px, 4.1vw, 42px);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.5px;
}
.tool-intro p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 17.5px;
  line-height: 1.7;
}

/* ===== TOOL CARD SHELL ===== */
.tool-card-shell {
  max-width: 760px;
  margin: 34px auto 0;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ---- DROPZONE ---- */
.dropzone {
  margin: 26px auto;
  max-width: 560px;
  border: none;
  border-radius: 0;
  min-height: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 20px;
  padding: 10px 12px;
  text-align: center;
  transition: opacity .2s;
  cursor: pointer;
  background: none;
  box-shadow: none;
  position: relative;
  overflow: visible;
}
.dropzone::before { display: none; }
.dropzone:hover { background: none; }
.dropzone.drag {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border-radius: 20px;
}
.dropzone .dz-ico { display: none; }
.dropzone h2,
.dropzone h3 {
  order: 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: clamp(18px, 2.6vw, 21px);
  font-weight: 800;
  margin: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 24px 36px;
  border-radius: 16px;
  box-shadow: 0 16px 32px -14px color-mix(in srgb, var(--primary) 60%, transparent);
  transition: transform .15s, box-shadow .15s;
  flex: 1 1 320px;
  max-width: 460px;
}
.dropzone:hover h2,
.dropzone:hover h3 {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px -14px color-mix(in srgb, var(--primary) 65%, transparent);
}
.dropzone p {
  order: 3;
  flex-basis: 100%;
  position: relative;
  font-size: 14.5px;
  color: var(--ink-faint, #9aa1ae);
  opacity: 1;
  margin-top: 2px;
  font-weight: 600;
}
.dropzone input[type="file"] { display: none; }
.accept-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---- FILE LIST ---- */
.file-list {
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 16px;
  align-items: start;
}
.file-list:empty { display: none; }
.file-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 12px 14px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  cursor: grab;
}
.file-item:active { cursor: grabbing; }
.file-item.dragging { opacity: .4; }
.file-item.drag-over {
  border-color: var(--primary);
  transform: scale(1.03);
  box-shadow: 0 10px 22px -10px var(--primary);
}
.file-item:hover {
  border-color: #d3d5e0;
  box-shadow: var(--shadow-sm);
}
.file-item .f-ico {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-item .f-ico svg {
  width: 24px;
  height: 24px;
}
.file-item .f-thumb {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px -6px rgba(17,24,39,.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-item .f-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.file-item .f-thumb-pdf {
  position: relative;
  background: var(--bg-soft);
}
.file-item .f-thumb-pdf img { object-fit: contain; transition: opacity .25s; }
.file-item .f-thumb-pdf .thumb-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid #d7dce3;
  border-top-color: var(--primary);
  animation: .7s linear infinite thumbSpin;
}
.file-item .f-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}
.file-item .f-name {
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  word-break: break-word;
  max-width: 100%;
}
.file-item button {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink-faint);
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(17,24,39,.12);
}
.file-item button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.file-item button svg {
  width: 13px;
  height: 13px;
}
.file-list .fl-summary {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-faint);
  border-bottom: 1px dashed var(--border);
  margin-bottom: 2px;
}
.file-list .fl-summary b {
  color: var(--ink);
  font-weight: 800;
}
.fl-reorder-hint {
  grid-column: 1/-1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  color: var(--primary-dark);
  border: 1px solid #fee2e2;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.8px;
  line-height: 1.7;
  margin: 0 0 14px;
}
.fl-reorder-hint svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--primary-dark);
}
.fl-multi-hint {
  grid-column: 1/-1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  color: var(--primary-dark);
  border: 1px solid #fee2e2;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.8px;
  font-weight: 600;
  line-height: 1.7;
  margin: 0 0 14px;
}
.fl-multi-hint svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--primary-dark);
}
@media (min-width: 992px) {
  .tool-card-shell.has-file .fl-reorder-hint { margin: 0 0 16px; }
}
.file-list .fl-toolbar {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 10px;
  margin-bottom: 4px;
}
.fl-toolbar .fl-count {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-soft);
}
.fl-toolbar .fl-tb-btns { display: flex; gap: 8px; }
.fl-tb-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s, color .15s;
}
.fl-tb-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.fl-tb-btn svg {
  width: 16px;
  height: 16px;
}
.fl-tb-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.file-item .f-num {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.file-item .f-page-ico { position: relative; }
.file-add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 2px dashed #c9cbe0;
  border-radius: var(--radius-md);
  padding: 18px 10px;
  min-height: 112px;
  cursor: pointer;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  transition: .15s;
}
.file-add-tile:hover {
  border-color: var(--primary);
  background: var(--bg-soft);
}
.file-add-tile .fat-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* ---- QUALITY PANEL ---- */
.quality-panel {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 16px 18px 14px;
}
.quality-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.quality-panel-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}
.quality-badge {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 3px 13px;
  border-radius: 999px;
  min-width: 46px;
  text-align: center;
}
.quality-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 700;
  margin-top: 4px;
}
.quality-level {
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 8px;
}
.quality-presets {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.q-chip {
  flex: 1;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px;
  cursor: pointer;
  transition: .15s;
  text-align: center;
}
.q-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.q-chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #fff;
}

/* ---- RANGE SLIDER (quality) ---- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0, var(--primary) var(--range-progress, 50%), #e3e5ef var(--range-progress, 50%), #e3e5ef 100%);
  outline: 0;
  cursor: pointer;
  margin: 14px 0 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(17,17,34,.18);
  cursor: pointer;
  transition: transform .15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(17,17,34,.18);
  cursor: pointer;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #e3e5ef;
}
input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

/* ---- PROTECT OPTIONS (PDF password) ---- */
.protect-options {
  margin: 18px 22px 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pw-field > span:first-child {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
}
.pw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--bg-soft);
  color: var(--ink);
  transition: .15s;
}
.pw-input-wrap input:focus {
  outline: 0;
  border-color: var(--primary);
  background: #fff;
}
.pw-toggle {
  position: absolute;
  inset-inline-end: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  border-radius: 50%;
}
.pw-toggle:hover {
  color: var(--ink-soft);
  background: var(--border);
}
.pw-toggle .icon {
  width: 19px;
  height: 19px;
}
.pw-strength {
  display: flex;
  gap: 4px;
}
.pw-strength i {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: var(--border);
}
.pw-strength[data-level="1"] i:first-child { background: #ef4444; }
.pw-strength[data-level="2"] i:first-child,
.pw-strength[data-level="2"] i:nth-child(2) { background: #f59e0b; }
.pw-strength[data-level="3"] i { background: #16a34a; }

/* ---- COMPRESS OPTIONS ---- */
.compress-options {
  margin: 18px 22px 4px;
}
.compress-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.compress-level-card {
  position: relative;
  display: block;
  text-align: start;
  padding: 14px 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  cursor: pointer;
  transition: .15s;
}
.compress-level-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.compress-level-card:hover { border-color: var(--primary); }
.compress-level-card:has(input:checked) {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 6px 16px -10px var(--primary);
}
.compress-level-card .cl-ico {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--ink-soft);
}
.compress-level-card:has(input:checked) .cl-ico { color: var(--primary); }
.compress-level-card .cl-badge {
  display: inline-block;
  margin-bottom: 3px;
  background: #16a34a;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.compress-level-card .cl-title {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}
.compress-level-card .cl-desc {
  display: block;
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin-top: 2px;
}
.compress-level-card .cl-check {
  position: absolute;
  top: 50%;
  inset-inline-end: 14px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--border);
  color: transparent;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compress-level-card:has(input:checked) .cl-check {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

/* ---- PAGE GRID (thumbnails) ---- */
.page-grid-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 12.5px;
}
.thumb-card .thumb-rotate-btns {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 6px;
  z-index: 2;
}
.thumb-card:hover .thumb-rotate-btns { display: flex; }
.thumb-card .thumb-rot-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--ink-soft);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.thumb-card .thumb-rot-btn:hover {
  background: var(--primary);
  color: #fff;
}
.thumb-card .thumb-rot-btn .icon {
  width: 15px;
  height: 15px;
}
.merge-pagenum-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 22px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}
.merge-pagenum-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ---- SPLIT OPTIONS ---- */
.split-options {
  margin: 18px 22px 4px;
  display: none;
}
.split-options.show { display: block; }
.split-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.split-mode-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  cursor: pointer;
  font-family: var(--font-body);
  transition: .15s;
}
.split-mode-btn:hover:not(:disabled) { border-color: var(--primary); }
.split-mode-btn .split-mode-ico {
  width: 30px;
  height: 30px;
  color: var(--ink-soft);
}
.split-mode-btn .split-mode-ico svg {
  width: 100%;
  height: 100%;
}
.split-mode-btn .split-mode-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.split-mode-btn.active {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 8px 18px -10px var(--primary);
}
.split-mode-btn.active .split-mode-ico { color: var(--primary); }
.split-mode-btn .split-mode-check {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.split-mode-btn.active .split-mode-check { display: flex; }
.split-mode-btn:disabled {
  cursor: not-allowed;
  opacity: .62;
}
.split-mode-btn:disabled .split-mode-label { color: var(--ink-faint); }
.split-pane { display: none; }
.split-pane.active { display: block; }
.split-pane-hint {
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px 16px;
  line-height: 1.7;
  margin: 0;
}
.extract-mode-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.extract-mode-row .split-range-btn { width: auto; flex: 1; }
.split-pane-hint.extract-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  color: var(--primary-dark);
}
.extract-info-ico {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-dark);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-grid-wrap {
  margin: 16px 22px 22px;
  display: none;
}
.page-grid-wrap.show { display: block; }
.page-grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.page-grid-head h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  margin: 0;
}
.page-grid-head p {
  font-size: 12px;
  color: var(--ink-faint);
  margin: 2px 0 0;
}
.page-grid {
  direction: ltr;
  display: grid;
  grid-template-columns: repeat(auto-fill, 140px);
  justify-content: start;
  align-content: start;
  gap: 14px;
  max-height: min(78vh, 900px);
  overflow-y: auto;
  padding: 6px 2px;
  -webkit-user-select: none;
  user-select: none;
}
@media (max-width: 640px) {
  .page-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    max-height: 72vh;
  }
  .thumb-card { width: 100%; }
}
.thumb-card {
  direction: rtl;
  position: relative;
  width: 140px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2.5px solid transparent;
  background: #fff;
  box-shadow: 0 3px 10px -4px rgba(17,24,39,.18);
  cursor: grab;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.thumb-card:hover {
  box-shadow: 0 8px 18px -8px rgba(17,24,39,.28);
  transform: translateY(-1px);
}
.thumb-card:active { cursor: grabbing; }
.thumb-card .thumb-canvas-wrap {
  transition: transform .2s;
  width: 100%;
  aspect-ratio: 0.72;
  background: center/cover #eef1f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.thumb-card .thumb-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid #d7dce3;
  border-top-color: var(--primary);
  animation: .7s linear infinite thumbSpin;
}
@keyframes thumbSpin { to { transform: rotate(360deg); } }
.thumb-card .thumb-num {
  position: absolute;
  bottom: 5px;
  inset-inline-end: 5px;
  background: rgba(17,24,39,.72);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.4;
}
.thumb-card .thumb-remove {
  position: absolute;
  top: 4px;
  inset-inline-start: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(17,24,39,.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.thumb-card:hover .thumb-remove { display: flex; }
.thumb-card .thumb-remove:hover { background: var(--primary-dark); }
.thumb-card.dragging { opacity: .35; }
.thumb-card.drag-over {
  border-color: var(--primary);
  transform: scale(1.03);
}
.thumb-card .thumb-check {
  position: absolute;
  top: 5px;
  inset-inline-start: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  cursor: pointer;
}
.thumb-card.pages-mode .thumb-check { display: flex; }
.thumb-card.pages-mode .thumb-remove { display: none !important; }
.thumb-card.pages-mode.thumb-selected .thumb-check {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.thumb-card.pages-mode:not(.thumb-selected) { opacity: .5; }
.thumb-card.pages-mode:not(.thumb-selected) .thumb-check {
  background: #fff;
  border-color: #c7ccd4;
}
.thumb-card.rc-0 { border-color: #3b82f6; }
.thumb-card.rc-1 { border-color: #f59e0b; }
.thumb-card.rc-2 { border-color: #22c55e; }
.thumb-card.rc-3 { border-color: #d946ef; }
.thumb-card.rc-4 { border-color: #ef4444; }
.thumb-card.rc-5 { border-color: #06b6d4; }
.thumb-card.selecting { box-shadow: 0 0 0 3px rgba(29,78,216,.28); }
.thumb-card .thumb-fname {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
  padding: 5px 5px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff;
  direction: rtl;
}
.file-list.page-grid .thumb-remove { display: flex; }
.thumb-card .thumb-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: #fff;
  padding: 6px 6px 7px;
  border-top: 1px solid var(--border);
}
.thumb-card .thumb-meta .thumb-fname {
  display: block;
  width: 100%;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
}
.thumb-card .thumb-fsize {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: .2px;
  direction: ltr;
}
.thumb-card .thumb-pagesize {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-faint);
  text-align: center;
  padding: 4px 4px 6px;
  background: #fff;
  border-top: 1px solid var(--border);
  direction: ltr;
  letter-spacing: .2px;
}
.thumb-card .thumb-zoom {
  position: absolute;
  bottom: 5px;
  inset-inline-start: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(17,24,39,.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .12s, background .12s;
}
.thumb-card:hover .thumb-zoom { opacity: 1; }
.thumb-card .thumb-zoom:hover { background: rgba(17,24,39,.8); }
.thumb-card.pages-mode .thumb-zoom {
  inset-inline-start: auto;
  inset-inline-end: 5px;
  bottom: 5px;
}
@media (hover: none) {
  .thumb-card .thumb-remove,
  .thumb-card .thumb-zoom {
    opacity: 1;
    display: flex;
  }
}
.split-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.split-zoom-overlay.show { display: flex; }
.split-zoom-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  max-width: 92vw;
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.5);
}
.split-zoom-close {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f3f6;
  color: #111827;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.split-zoom-close:hover { background: #e5e8ee; }
.split-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(17,24,39,.55);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.split-zoom-nav:hover { background: rgba(17,24,39,.8); }
.split-zoom-nav[disabled] {
  opacity: .35;
  cursor: not-allowed;
}
.split-zoom-prev { inset-inline-start: 10px; }
.split-zoom-next { inset-inline-end: 10px; }
.split-zoom-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 140px;
  margin-top: 8px;
}
.split-zoom-canvas-wrap canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.split-zoom-caption {
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 10px;
}
.range-item.range-active {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 8px 18px -14px var(--primary);
}
.split-range-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.split-range-modes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.split-range-btn {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
  transition: .15s;
}
.split-range-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff;
  box-shadow: 0 8px 18px -12px var(--primary);
}
.split-range-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.range-pane { display: none; }
.range-pane.active { display: block; }
.range-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}
.range-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--bg-soft);
}
.range-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  cursor: pointer;
}
.range-item-head span {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-soft);
}
.range-item-body {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.range-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.range-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-faint);
}
.range-field input {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: 0;
  background: #fff;
  width: 100%;
}
.range-field input:focus { border-color: var(--primary); }
.range-remove {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.range-remove:hover {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}
.add-range-btn {
  width: 100%;
  padding: 13px;
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  margin-bottom: 16px;
}
.add-range-btn:hover { background: var(--primary-50); }
.fixed-size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.fixed-size-row span {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
.fixed-size-row input {
  width: 90px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: 0;
  background: var(--bg-soft);
  text-align: center;
}
.fixed-size-row input:focus {
  border-color: var(--primary);
  background: #fff;
}
.merge-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.merge-check-row input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

/* ---- CALC GRID ---- */
.calc-grid {
  margin: 0 22px 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.full { grid-column: 1/-1; }
.field label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-soft);
}
.field input,
.field select {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  outline: 0;
  background: var(--bg-soft);
}
.field input:focus,
.field select:focus {
  border-color: var(--primary);
  background: #fff;
}

/* ---- TOOL ACTIONS (sticky run button) ---- */
.tool-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 22px 30px;
}
.tool-actions .btn {
  width: 100%;
  max-width: 340px;
}
.progress-wrap {
  margin: 0 22px;
  display: none;
}
.progress-wrap.show { display: block; }
.progress-track {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-soft);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary, #2DCC29), var(--primary-dark, #2DCC29)) !important;
  transition: width .25s;
}
.progress-label {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---- RESULT PANEL ---- */
.result-panel {
  display: none;
  text-align: center;
  padding: 42px 30px 36px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.result-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark)) !important;
}
.result-panel.show {
  display: block;
  animation: resultPop .45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes resultPop {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.result-panel .r-ico {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9f9ef, #d3f3e0);
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  box-shadow: 0 14px 30px -12px rgba(22,163,74,.45);
}
.result-panel .r-ico svg {
  width: 40px;
  height: 40px;
}
.result-panel h2,
.result-panel h3 {
  font-size: 21px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--ink);
}
.result-panel p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 26px;
  line-height: 1.75;
  max-width: 400px;
  margin-inline: auto;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.result-actions .btn { min-width: 190px; }
.continue-to {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.continue-to-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-faint);
  letter-spacing: .03em;
  margin-bottom: 12px;
}
.continue-to-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-bottom: 14px;
}
.continue-to-chip {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 9px;
  font-size: 12.8px;
  font-weight: 700;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: .18s;
}
html[dir=rtl] .continue-to-chip { padding: 7px 9px 7px 14px; }
.continue-to-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.continue-to-chip .ct-ico {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50) !important;
  color: var(--primary-dark) !important;
  flex-shrink: 0;
}
.continue-to-chip .ct-ico svg {
  width: 12px;
  height: 12px;
}
.share-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: 0 0;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
  transition: .18s;
  font-family: var(--font-body);
}
.share-tool-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.share-tool-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ---- TOAST ---- */
.fastols-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.35);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: 88vw;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fastols-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 480px) {
  .continue-to-chip {
    font-size: 12px;
    padding: 6px 12px 6px 8px;
  }
  html[dir=rtl] .continue-to-chip { padding: 6px 8px 6px 12px; }
  .share-tool-btn {
    padding: 8px 15px;
    font-size: 12.5px;
  }
}

/* ---- NOTICES ---- */
.notice-soon {
  margin: 0 22px 20px;
  background: #fff7e6;
  border: 1.5px solid #fce3ae;
  color: #8a5a00;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12.8px;
  line-height: 1.7;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.notice-soon svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
}
.notice-soon.live {
  background: #eafbf1;
  border-color: #b6efcb;
  color: #0f6b37;
}
.error-banner {
  margin: 0 22px 18px;
  background: #fdecec;
  border: 1.5px solid #f6c4c4;
  color: #b4232c;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.7;
  display: none;
  gap: 10px;
  align-items: flex-start;
}
.error-banner.show { display: flex; }
.error-banner svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
}
.tool-gate-box {
  margin: 22px;
  padding: 44px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
}
.tool-gate-box.is-soon {
  background: #fff7e6;
  border: 1.5px solid #fce3ae;
}
.tool-gate-box.is-maintenance {
  background: #fdecec;
  border: 1.5px solid #f6c4c4;
}
.tool-gate-ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-gate-box.is-soon .tool-gate-ico {
  background: #d97706;
  color: #fff;
}
.tool-gate-box.is-maintenance .tool-gate-ico {
  background: #b4232c;
  color: #fff;
}
.tool-gate-ico svg {
  width: 26px;
  height: 26px;
}
.tool-gate-box h3 {
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 8px;
}
.tool-gate-box.is-soon h3 { color: #8a5a00; }
.tool-gate-box.is-maintenance h3 { color: #b4232c; }
.tool-gate-box p {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 420px;
  margin: 0 auto;
}
.summary-text {
  text-align: start;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
  margin-bottom: 18px;
  max-height: 320px;
  overflow: auto;
  font-family: inherit;
  word-break: break-word;
}
.summary-text[dir=ltr] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.result-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.result-meta .m {
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 22px;
  min-width: 100px;
}
.result-meta .m b {
  display: block;
  font-size: 21px;
  font-weight: 900;
  color: var(--ink);
}
.result-meta .m span {
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 700;
  margin-top: 3px;
  display: block;
}
.result-meta .m b.saved-pct { color: #16a34a; }
.video-result-preview {
  max-width: 420px;
  margin: 0 auto 18px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.28);
  border: 1.5px solid var(--border);
  background: #0b0b0f;
}
.video-result-preview img,
.video-result-preview video {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #0b0b0f;
}

/* ---- ESIGN BUILDER ---- */
.esign-builder {
  margin: 0 22px 4px;
}
.esign-builder-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.esign-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.esign-tab {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
}
.esign-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
}
.js-sign-canvas {
  width: 100%;
  height: 180px;
  border: 1.5px dashed #d9dce6;
  border-radius: 14px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
  display: block;
  margin-bottom: 12px;
}
.esign-pane .btn-sm {
  padding: 8px 16px;
  font-size: 12.5px;
}
.js-sign-text {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 20px;
  outline: 0;
  background: var(--bg-soft);
  margin-bottom: 14px;
  font-family: var(--font-body);
}
.js-sign-text:focus {
  border-color: var(--primary);
  background: #fff;
}
.js-sign-font-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.esign-font-opt {
  flex: 1;
  min-width: 120px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 19px;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}
.esign-font-opt.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50, #eff4ff);
}
.js-sign-color-row {
  display: flex;
  gap: 10px;
}
.esign-color-opt {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
}
.esign-color-opt.active {
  box-shadow: 0 0 0 3px var(--primary-50, #eff4ff);
  border-color: var(--primary);
}
.esign-upload-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 2px dashed #d9dce6;
  border-radius: 14px;
  padding: 28px;
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13.5px;
  background: var(--bg-soft);
}
.esign-upload-btn svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
}
.esign-pane[data-esign-pane="upload"] .accept-note {
  margin-top: 12px;
  text-align: center;
}
.js-sign-preview-wrap {
  margin: 6px 22px 4px;
}
.esign-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}
.js-sign-page-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
.js-sign-stage {
  position: relative;
  margin: 0 auto;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #f1f2f7;
}
.js-sign-page-canvas {
  display: block;
  width: 100%;
  height: auto;
}
.js-sign-overlay {
  position: absolute;
  border: 1.5px dashed var(--primary);
  cursor: move;
  touch-action: none;
}
.js-sign-overlay-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}
.js-sign-resize {
  position: absolute;
  left: -7px;
  bottom: -7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  cursor: nwse-resize;
  touch-action: none;
}

/* ---- TOOL FORM (generic) ---- */
.tool-form {
  padding: 26px 22px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tool-form .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tool-form input,
.tool-form select,
.tool-form textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: 0;
  background: var(--bg-soft);
  color: var(--ink);
}
.tool-form textarea {
  min-height: 150px;
  resize: vertical;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  direction: ltr;
  text-align: left;
}
.tool-form textarea.rtl-area {
  font-family: var(--font-body);
  direction: rtl;
  text-align: right;
}
.tool-form input:focus,
.tool-form select:focus,
.tool-form textarea:focus {
  border-color: var(--primary);
  background: #fff;
}
.tool-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-soft);
}
.seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.seg button {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink-soft);
  transition: .15s;
}
.seg button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-soft);
}
.output-box {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.7;
  max-height: 340px;
  overflow: auto;
  direction: ltr;
  text-align: left;
}
.output-box.rtl-area {
  font-family: var(--font-body);
  direction: rtl;
  text-align: right;
}
.copy-row {
  display: flex;
  justify-content: flex-end;
}
.copy-row button {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary);
  background: 0 0;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.copy-row button svg {
  width: 14px;
  height: 14px;
}
.inline-error {
  color: #b4232c;
  font-size: 12.5px;
  font-weight: 700;
  display: none;
}
.inline-error.show { display: block; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 520px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-box {
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.stat-box b {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}
.stat-box span {
  font-size: 11.5px;
  color: var(--ink-faint);
  font-weight: 700;
}
.diff-view {
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  max-height: 340px;
  overflow: auto;
  font-family: 'Courier New', monospace;
  font-size: 12.8px;
  line-height: 1.85;
  direction: ltr;
  text-align: left;
}
.hash-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hash-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.hash-row b {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink-soft);
  min-width: 70px;
}
.hash-row code {
  flex: 1;
  min-width: 180px;
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  direction: ltr;
  text-align: left;
  word-break: break-all;
  color: var(--ink);
}
.hash-row button {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  background: 0 0;
  border: none;
  flex-shrink: 0;
}
.pw-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 0 22px;
}
.pw-opts label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.pw-opts input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.strength-bar {
  margin: 16px 22px 0;
  height: 8px;
  border-radius: 99px;
  background: var(--bg-soft);
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width .2s, background .2s;
}
.color-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 22px;
}
.color-row input[type="color"] {
  width: 56px;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 2px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.color-preview {
  margin: 16px 22px 0;
  height: 70px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
}
.page-org-list {
  margin: 0 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}
.page-org-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.pg-num {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}
.pg-actions {
  display: flex;
  gap: 6px;
}
.pg-actions button {
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink-soft);
}
.pg-actions button:disabled { opacity: .35; }
.pg-actions .pg-del {
  color: #b4232c;
  border-color: #f6c4c4;
}
.qr-preview {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}
.qr-preview #qrHolder {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: inline-flex;
}
.diff-line {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 1px 6px;
  border-radius: 4px;
}
.diff-add {
  background: #e6f7ec;
  color: #0f6b37;
}
.diff-del {
  background: #fdecec;
  color: #b4232c;
  text-decoration: line-through;
  text-decoration-color: #e79;
}
.diff-same { color: var(--ink-faint); }
mark.rx-hit {
  background: #fce68a;
  color: var(--ink);
  border-radius: 3px;
  padding: 0 1px;
}
.issue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.issue-item {
  background: #fff7e6;
  border: 1.5px solid #fce3ae;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: #8a5a00;
}
.issue-item b {
  display: block;
  font-size: 12.5px;
  margin-bottom: 3px;
  color: #6b4400;
}
.no-issues {
  background: #eafbf1;
  border: 1.5px solid #b6efcb;
  color: #0f6b37;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 13.5px;
}
.keyword-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.keyword-table th {
  text-align: right;
  color: var(--ink-faint);
  font-size: 11.5px;
  padding: 8px 10px;
  border-bottom: 1.5px solid var(--border);
}
.keyword-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
.keyword-table tr:last-child td { border-bottom: none; }
.bar-track {
  background: var(--border);
  border-radius: 99px;
  height: 6px;
  width: 100%;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s, transform .5s;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.static-page {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.static-block h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.static-block p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.legal-updated {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface, #f8f9fb);
  border: 1px solid var(--border, #e7e9ee);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft, #5b6270);
}
.ad-slot {
  display: block;
  width: 100%;
  max-width: 728px;
  margin: 0 auto;
  text-align: center;
}
.ad-slot::before {
  content: "إعلان";
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-faint, #9aa1ae);
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.ad-slot ins.adsbygoogle { display: block; }
.ad-slot.ad-slot-tool-idle { margin-top: 18px; }
.ad-slot.ad-slot-tool-result { margin: 18px 0; }
.ad-slot.ad-slot-tool-inline { margin: 18px 0; }
.ad-slot.ad-slot-article-cta { margin: 30px 0 0; }
.tool-card-shell:has(.result-panel.show) .ad-slot-tool-idle { display: none !important; }
.tool-card-shell:not(:has(.result-panel.show)) .ad-slot-tool-result { display: none !important; }
.pdf-tool-page .tool-page-hero { padding: 32px 0 18px; }
.pdf-tool-page .tool-card-shell { max-width: 1040px; }
.pdf-tool-page .tool-about,
.pdf-tool-page .tool-faq,
.pdf-tool-page .tool-howto { max-width: 900px; }
@media (min-width: 900px) {
  .pdf-tool-page .compress-levels { gap: 14px; }
}

/* ---- TOOL ABOUT / FAQ / HOWTO ---- */
.tool-about,
.tool-faq,
.tool-howto {
  max-width: 760px;
  margin: 40px auto 0;
}
.tool-about h2,
.tool-faq h2,
.tool-howto h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}
.tool-about p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft, #5b6270);
  margin: 0 0 14px;
}
.tool-about p:last-child { margin-bottom: 0; }
.howto-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.howto-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface, #f8f9fb);
  border: 1px solid var(--border, #e7e9ee);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
}
.howto-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.tool-faq { margin-bottom: 40px; }
.faq-item {
  border-bottom: 1px solid var(--border, #e7e9ee);
  padding: 16px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}
.faq-item p {
  font-size: 14px;
  color: var(--ink-soft, #5b6270);
  line-height: 1.7;
  margin: 0;
}

/* ---- LANGUAGE DROPDOWN ---- */
.lang-switch-dd {
  position: relative;
  flex-shrink: 0;
}
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.lang-switch-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.lang-switch-btn .lang-globe {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-faint, #9aa1af);
}
.lang-switch-btn .lang-caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform .2s;
}
.lang-switch-dd.open .lang-switch-btn {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}
.lang-switch-dd.open .lang-switch-btn .lang-globe { color: var(--primary); }
.lang-switch-dd.open .lang-caret { transform: rotate(180deg); }
.lang-switch-panel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(420px, 88vw);
  z-index: 60;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: .18s;
}
.lang-switch-dd.open .lang-switch-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-switch-panel a {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft, #5b6270);
  text-decoration: none;
  transition: .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lang-switch-panel a:hover {
  color: var(--primary);
  background: var(--bg-soft, #f3f4f6);
}
.lang-switch-panel a.active {
  background: var(--primary);
  color: #fff;
}
/* قائمة تبديل اللغة اللي في الفوتر لازم تتفتح لفوق مش لتحت، عشان
   هي أصلًا في آخر الصفحة، ولو فتحت لتحت بتخرج برة الشاشة ومحدش
   يقدر يشوفها غير لو عمل سكرول. */
.footer-bottom .lang-switch-panel {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateY(6px);
}
.footer-bottom .lang-switch-dd.open .lang-switch-panel {
  transform: translateY(0);
}
.mobile-panel-top .lang-switch-dd { margin-inline-start: 8px; }
.mobile-panel-top .lang-switch-btn {
  padding: 8px 12px;
  font-size: 13px;
}
.mobile-panel-top .lang-switch-panel {
  inset-inline-end: 0;
  width: min(320px, 84vw);
}
@media (max-width: 480px) {
  /* هذه القاعدة كانت قبل كده عامة على .lang-switch-panel كله، وده كان
     بيكسر قائمة تبديل اللغة اللي في الفوتر (وأي نسخة تانية غير اللي في
     الهيدر): كانت بتتحول لـ position:fixed ملتصقة بأعلى الشاشة تحت
     الهيدر بدل ما تفتح جنب الزرار اللي المستخدم داس عليه فعلاً في آخر
     الصفحة، فكانت تظهر بعيدة تمامًا عن مكان الزرار (أو حتى مش ظاهرة
     خالص لو المستخدم مكانش مسكرول لفوق) — يعني عمليًا بتبان "مش شغالة".
     دلوقتي مقصورة على نسخة الهيدر بس، اللي فعلاً محتاجة تتفتح بعرض
     التابت لأنها في أعلى الشاشة أصلًا. */
  .header-cta .lang-switch-panel {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 16px;
    right: 16px;
    inset-inline-end: auto;
    width: auto;
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow-y: auto;
    grid-template-columns: repeat(2, 1fr);
  }
  /* .mobile-panel (its parent here) always has a CSS transform for its slide
     animation, which makes position:fixed children anchor to it instead of
     the viewport. Keep this one anchored (absolute) to the button instead. */
  .mobile-panel-top .lang-switch-panel,
  .footer-bottom .lang-switch-panel {
    position: absolute;
    inset-inline-end: 0;
    left: auto;
    right: auto;
    width: min(300px, 84vw);
    max-height: min(60vh, 420px);
    overflow-y: auto;
    grid-template-columns: repeat(2, 1fr);
  }
  .mobile-panel-top .lang-switch-panel {
    top: calc(100% + 8px);
    bottom: auto;
  }
  /* الفوتر: تفتح لفوق بدل تحت (نفس السبب اللي فوق) — وبتتمركز فوق
     الزرار بالظبط (left:50% + translateX(-50%)) بدل ما تتلزق بحرف
     الزرار (inset-inline-end:0)، لأن زرار الفوتر بيقع في أماكن مختلفة
     حسب اللغة/عرض الشاشة (تحت الكوبي رايت لو الصف اتلف على سطرين)،
     فالمحاذاة بحرف واحد كانت بتخلي القائمة تطلع برة الشاشة على
     الشمال أو اليمين حسب مكان الزرار. المحاذاة للنص + عرض محسوب من
     100vw بتضمن إنها تفضل جوه الشاشة أيًا كان مكان الزرار. */
  .footer-bottom .lang-switch-panel {
    top: auto;
    bottom: calc(100% + 8px);
    inset-inline-end: auto;
    left: 50%;
    right: auto;
    width: min(300px, calc(100vw - 32px));
    transform: translateX(-50%) translateY(6px);
  }
  .footer-bottom .lang-switch-dd.open .lang-switch-panel {
    transform: translateX(-50%) translateY(0);
  }
  /* زرار اللغة في الفوتر لازم يكون relative عشان القائمة المطلقة
     فوق دي تترتب بالنسبة له هو، مش بالنسبة لأقرب عنصر relative تاني
     في الصفحة (زي .footer-bottom نفسها لو كانت relative بالغلط). */
  .footer-bottom .lang-switch-dd {
    position: relative;
  }
}

/* ---- AUDIO PRO (trim/cut) ---- */
.audio-pro {
  margin: 16px 0;
  padding: 16px 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.audio-pro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.audio-pro-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.audio-duration-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}
.audio-wave-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  padding: 0;
}
.audio-wave-canvas {
  display: block;
  width: 100%;
  height: 84px;
}
.audio-wave-region {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 22%, transparent), color-mix(in srgb, var(--primary) 10%, transparent));
  border-inline: 2px solid var(--primary);
  pointer-events: none;
}
.audio-preview-el {
  width: 100%;
  display: block;
  margin-top: 10px;
  height: 36px;
}
.trim-slider-wrap {
  position: relative;
  height: 30px;
  margin: 14px 2px 4px;
}
.trim-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  height: 30px;
  -webkit-appearance: none;
  appearance: none;
  background: 0 0;
  pointer-events: none;
}
.trim-range::-webkit-slider-runnable-track { height: 6px; background: 0 0; }
.trim-range::-moz-range-track { height: 6px; background: 0 0; }
.trim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(20,20,43,.35);
  margin-top: -7px;
  cursor: grab;
}
.trim-range::-moz-range-thumb {
  pointer-events: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(20,20,43,.35);
  cursor: grab;
}
.trim-slider-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
}
.audio-pro-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.audio-pro-grid .field {
  flex: 1;
  min-width: 150px;
}
.audio-pro-grid .field input,
.audio-pro-grid .field select { width: 100%; }
.audio-pro-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  padding-top: 8px;
}
.audio-pro-inline input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}
.audio-real-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eff9f1;
  border: 1px solid #bfe8c6;
  color: #166534;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.6;
}
.audio-real-banner svg {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 1px;
  fill: none;
  stroke: #16A34A;
  stroke-width: 2;
}
.audio-result-compare {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 6px 0 2px;
}
.audio-result-compare .m {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 16px;
  text-align: center;
  min-width: 110px;
}
.audio-result-compare .m b {
  display: block;
  font-size: 15px;
  color: var(--ink);
}
.audio-result-compare .m span {
  font-size: 11.5px;
  color: var(--ink-faint);
  font-weight: 700;
}
.audio-result-compare .m.saved b { color: #16a34a; }

/* ---- OCR PRO ---- */
.ocr-pro {
  margin: 16px 0;
  padding: 16px 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.ocr-pro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ocr-pro-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}
.ocr-pro-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}
.ocr-preview-wrap {
  position: relative;
  min-height: 96px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}
.ocr-preview-wrap img {
  max-width: 100%;
  max-height: 260px;
  display: block;
  object-fit: contain;
}
.ocr-preview-empty {
  font-size: 12.5px;
  color: var(--ink-faint);
  font-weight: 700;
  padding: 22px 10px;
  text-align: center;
}
.ocr-pro-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.ocr-pro-grid .field {
  flex: 1;
  min-width: 180px;
}
.ocr-pro-grid .field select { width: 100%; }

/* ---- WORKSPACE GRID (desktop layout) ---- */
.tool-workspace-grid { display: block; }
.tool-settings-col { display: none; }
.tool-card-shell.has-file .tool-settings-col {
  display: block;
  padding-bottom: 88px;
}
.tool-card-shell.has-file { max-width: 1040px; }
.tool-card-shell.has-file .dropzone { display: none !important; }
.tool-card-shell.has-file .tool-preview-col { padding-top: 22px; }
@media (min-width: 992px) {
  .tool-card-shell.has-file .tool-preview-col { padding-top: 0; }
  .tool-card-shell.has-file .tool-settings-col { padding-bottom: 26px; }
}

.tool-card-shell.has-file .tool-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex-direction: column;
  padding: 16px 0 4px;
  margin-top: auto;
  width: 100%;
  background: var(--bg, #fff);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 20px -16px rgba(20,20,43,.2);
}
.tool-card-shell.has-file .tool-actions .btn {
  width: 100%;
  max-width: none;
  box-shadow: 0 14px 30px -10px rgba(20,20,43,.4);
}
.tool-result-stage {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 22px;
}
.fl-toolbar.in-sidebar {
  flex-direction: column;
  align-items: flex-start;
  grid-column: auto;
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.fl-toolbar.in-sidebar .fl-count {
  margin-bottom: 12px;
  font-size: 13px;
}
.fl-toolbar.in-sidebar .fl-tb-btns {
  flex-direction: row;
  gap: 10px;
}
@media (min-width: 992px) {
  .tool-card-shell.has-file .tool-settings-col { position: sticky; }
  .fl-toolbar.in-sidebar {
    position: absolute;
    top: 20px;
    inset-inline-end: 20px;
    width: auto;
    padding: 0;
    margin: 0;
    border: none;
    z-index: 2;
  }
  .fl-toolbar.in-sidebar .fl-count { display: none; }
  .fl-toolbar.in-sidebar .fl-tb-btns {
    flex-direction: column;
    gap: 12px;
  }
}
.fl-toolbar .js-fl-add {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: 0 10px 22px -10px var(--primary);
}
.fl-toolbar .js-fl-add:hover {
  filter: brightness(1.08);
  color: #fff;
}
.fl-toolbar.in-sidebar .js-fl-sort {
  width: 46px;
  height: 46px;
  border-radius: 50%;
}
@media (min-width: 992px) {
  .tool-card-shell.has-file {
    max-width: none;
    width: 100%;
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    margin: 0;
  }
  .tool-card-shell.has-file .tool-workspace-grid {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    flex-direction: row;
    min-height: calc(100vh - var(--header-h) - 64px);
  }
  .tool-card-shell.has-file .tool-preview-col {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--bg-soft);
    padding: 40px 44px;
  }
  .tool-card-shell.has-file .tool-settings-col {
    display: flex;
    flex-direction: column;
    width: 300px;
    flex: 0 0 300px;
    position: sticky;
    top: var(--header-h);
    align-self: flex-start;
    min-height: calc(100vh - var(--header-h));
    max-height: 100vh;
    background: #fff;
    border-inline-start: 1.5px solid var(--border);
    padding: 26px 24px;
    overflow: visible;
  }
  html[dir=rtl] .tool-card-shell.has-file .tool-preview-col,
  html[dir=rtl] .tool-card-shell.has-file .tool-settings-col {
    direction: rtl;
    text-align: right;
  }
  .tool-card-shell.has-file .file-list { padding: 0; }
  .tool-card-shell.has-file .accept-note {
    margin: 18px 0 0;
    text-align: start !important;
  }
  .tool-card-shell.has-file .tool-preview-col:has(.page-grid-wrap.show) .file-list { display: none; }
  .tool-card-shell.has-file .tool-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    flex-direction: column;
    padding: 16px 0 4px;
    margin-top: auto;
    width: 100%;
    background: var(--bg, #fff);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 20px -16px rgba(20,20,43,.2);
  }
  .tool-card-shell.has-file .tool-actions .btn {
    width: 100%;
    max-width: none;
    box-shadow: 0 14px 30px -10px rgba(20,20,43,.4);
  }
  .tool-card-shell.has-file .calc-grid,
  .tool-card-shell.has-file .compress-options,
  .tool-card-shell.has-file .esign-builder,
  .tool-card-shell.has-file .merge-pagenum-toggle,
  .tool-card-shell.has-file .progress-wrap,
  .tool-card-shell.has-file .protect-options,
  .tool-card-shell.has-file .quality-panel,
  .tool-card-shell.has-file .split-options,
  .tool-card-shell.has-file .tool-options {
    margin-inline: 0;
  }
}
.tool-card-shell.is-busy .audio-real-banner,
.tool-card-shell.is-busy .tool-workspace-grid,
.tool-card-shell.is-result .audio-real-banner,
.tool-card-shell.is-result .tool-workspace-grid { display: none; }

/* ---- FOOTER OVERRIDES (light) ---- */
.site-footer {
  background: #FFFFFF;
  color: #000000;
  border-top: 1px solid #E8E9F1;
}
.site-footer .brand { color: #000000 !important; }
.site-header .brand {
  color: #000 !important;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.site-header .brand small,
.site-header .brand span { color: #000 !important; }
.site-header .brand .brand-mark { color: #fff !important; }
.site-header .brand img,
.site-header .brand svg {
  background: transparent;
  border-radius: 8px;
}
.site-footer .brand small { color: #000000 !important; }
.footer-brand p { color: #000000; }
.footer-grid { border-bottom-color: #E8E9F1; }
.footer-bottom { color: #000000; }
.footer-bottom a { color: #000000; }
.footer-bottom a:hover { color: #000000; }
.footer-social a {
  background: rgba(20,20,43,.06) !important;
  color: #000000 !important;
}
.footer-social a:hover { background: rgba(20,20,43,.12) !important; }
.footer-col h4 { color: #000000; }
.footer-col a { color: #000000; }
.footer-col a:hover { color: #000000; }
.tool-footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: #229ed9;
  background: rgba(34,158,217,.08);
  border: 1.5px solid rgba(34,158,217,.28);
  border-radius: 999px;
  padding: 6px 14px;
  transition: .18s;
  white-space: nowrap;
}
.tool-footer-telegram:hover {
  background: #229ed9;
  color: #fff;
  border-color: #229ed9;
}
.tool-footer-telegram svg { flex-shrink: 0; }

/* ---- HOME ARTICLES ---- */
.home-articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 26px;
}
@media (min-width: 640px) {
  .home-articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .home-articles-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
.home-article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: .2s;
  box-shadow: var(--shadow-sm);
}
.home-article-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.home-article-cover {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  position: relative;
  overflow: hidden;
}
.home-article-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 15% 10%, rgba(255,255,255,.22), transparent 60%);
}
.home-article-cover svg {
  width: 34px;
  height: 34px;
  color: #fff;
  position: relative;
}
.home-article-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.home-article-cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 800;
  color: #000;
  background: var(--primary-50);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 10px;
}
.home-article-body h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 8px;
}
.home-article-body p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 14px;
  flex: 1;
}
.home-article-link {
  font-size: 13px;
  font-weight: 700;
  color: #000;
}
.home-articles-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* ---- BLOG GRID ---- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 4px;
}
@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .blog-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  height: 100%;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.blog-card-cover {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  overflow: hidden;
  flex-shrink: 0;
}
.blog-card-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(65% 85% at 12% 8%, rgba(255,255,255,.25), transparent 60%);
}
.blog-card-cover::after {
  content: "";
  position: absolute;
  inset-inline-start: -10%;
  bottom: -40%;
  width: 70%;
  padding-top: 70%;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.blog-card-cover svg {
  width: 40px;
  height: 40px;
  color: #fff;
  position: relative;
}
.blog-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-cat {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 800;
  color: #000;
  background: var(--primary-50);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.blog-card-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.blog-card:hover .blog-card-title { color: #000; }
.blog-grid > .blog-card:first-child {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
}
@media (min-width: 760px) {
  .blog-grid > .blog-card:first-child { flex-direction: row; }
}
.blog-grid > .blog-card:first-child .blog-card-cover { height: 220px; }
@media (min-width: 760px) {
  .blog-grid > .blog-card:first-child .blog-card-cover {
    width: 42%;
    height: auto;
    flex-shrink: 0;
  }
}
.blog-grid > .blog-card:first-child .blog-card-cover svg {
  width: 64px;
  height: 64px;
}
.blog-grid > .blog-card:first-child .blog-card-body { padding: 30px 34px; }
@media (min-width: 760px) {
  .blog-grid > .blog-card:first-child .blog-card-body { justify-content: center; }
}
.blog-grid > .blog-card:first-child .blog-card-title {
  font-size: 23px;
  -webkit-line-clamp: 3;
}
.blog-grid > .blog-card:first-child .blog-card-desc {
  font-size: 15px;
  -webkit-line-clamp: 3;
  margin-bottom: 20px;
}
.blog-grid > .blog-card:first-child .blog-card-foot {
  border-top: none;
  padding-top: 0;
  font-size: 14px;
}

/* ===== CODE EDITOR (fastols-dev) ===== */
.code-editor {
  border-radius: 14px;
  overflow: hidden;
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: 0 14px 32px -18px rgba(15,23,42,.45);
  margin-top: 10px;
}
.code-editor:first-child { margin-top: 2px; }
.code-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
  flex-wrap: wrap;
}
.code-editor-dots {
  display: flex;
  gap: 5px;
  margin-inline-end: 4px;
  flex-shrink: 0;
}
.code-editor-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}
.code-editor-dots span:nth-child(1) { background: #f87171; }
.code-editor-dots span:nth-child(2) { background: #fbbf24; }
.code-editor-dots span:nth-child(3) { background: #34d399; }
.code-editor-lang {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #93c5fd;
  background: rgba(147,197,253,.12);
  border: 1px solid rgba(147,197,253,.25);
  border-radius: 6px;
  padding: 3px 8px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.code-editor-stats {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  direction: ltr;
}
.code-editor-spacer { flex: 1; min-width: 6px; }
.code-editor-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.code-editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
  transition: .15s;
  font-family: var(--font-body);
}
.code-editor-btn:hover {
  background: #334155;
  color: #fff;
  border-color: #475569;
}
.code-editor-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}
.code-editor-btn.is-copied {
  color: #34d399;
  border-color: #34d399;
}
.code-editor-body {
  display: flex;
  max-height: 360px;
  overflow: auto;
}
.code-editor-gutter {
  flex-shrink: 0;
  padding: 12px 0;
  text-align: end;
  font: 12.5px/1.65 'JetBrains Mono', Consolas, 'Courier New', monospace;
  color: #475569;
  background: #18233a;
  -webkit-user-select: none;
  user-select: none;
  min-width: 38px;
}
.code-editor-gutter div { padding-inline-end: 9px; }
.code-editor-textarea {
  flex: 1;
  min-width: 0;
  resize: vertical;
  border: none;
  outline: 0;
  background: #1e293b;
  color: #e2e8f0;
  font: 12.5px/1.65 'JetBrains Mono', Consolas, 'Courier New', monospace;
  padding: 12px 14px;
  direction: ltr;
  text-align: left;
  white-space: pre;
  overflow-wrap: normal;
}
.code-editor-textarea::placeholder { color: #475569; }
.code-editor-output .output-box,
.code-editor-output .diff-view {
  flex: 1;
  min-width: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #1e293b;
  color: #e2e8f0;
  font: 12.5px/1.65 'JetBrains Mono', Consolas, 'Courier New', monospace;
  padding: 12px 14px;
  max-height: none;
  direction: ltr;
  text-align: left;
}
.code-editor-output .diff-view { white-space: pre-wrap; }
.tok-str { color: #a5d6a7; }
.tok-key { color: #7dd3fc; }
.tok-num { color: #fbbf24; }
.tok-kw { color: #c4b5fd; font-weight: 700; }
.tok-bool { color: #f9a8d4; }
.tok-com { color: #64748b; font-style: italic; }
.tok-tag { color: #f472b6; }
.tok-attr { color: #93c5fd; }
.tok-punct { color: #94a3b8; }
.tok-prop { color: #7dd3fc; }
.tok-sel { color: #f9a8d4; }
.code-editor-output .diff-add {
  background: rgba(52,211,153,.16);
  color: #6ee7b7;
}
.code-editor-output .diff-del {
  background: rgba(248,113,113,.16);
  color: #fca5a5;
  text-decoration-color: #fca5a5;
}
.code-editor-output .diff-same { color: #94a3b8; }
.code-editor-output mark.rx-hit {
  background: #fbbf24;
  color: #1e293b;
  border-radius: 3px;
}
.code-editor.is-light {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.code-editor.is-light .code-editor-toolbar {
  background: #eef2f7;
  border-color: #e2e8f0;
}
.code-editor.is-light .code-editor-gutter {
  background: #eef2f7;
  color: #94a3b8;
}
.code-editor.is-light .code-editor-textarea,
.code-editor.is-light .code-editor-output .output-box,
.code-editor.is-light .code-editor-output .diff-view {
  background: #fff;
  color: #1e293b;
}
.code-editor.is-light .code-editor-textarea::placeholder { color: #b7bdc9; }
.code-editor.is-light .tok-str { color: #15803d; }
.code-editor.is-light .tok-key { color: #1d4ed8; }
.code-editor.is-light .tok-num { color: #b45309; }
.code-editor.is-light .tok-kw { color: #7e22ce; }
.code-editor.is-light .tok-com { color: #94a3b8; }
.code-editor.is-light .tok-tag { color: #be185d; }
.code-editor.is-light .tok-attr { color: #1d4ed8; }
.code-editor.is-light .tok-sel { color: #be185d; }
.code-editor.is-light .tok-prop { color: #1d4ed8; }
.code-editor.is-light .code-editor-btn {
  background: #fff;
  border-color: #e2e8f0;
  color: #334155;
}
.code-editor.is-light .code-editor-btn:hover {
  background: #eef2f7;
  color: #0f172a;
}
.code-editor.is-light .code-editor-lang {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.code-editor.is-light .code-editor-stats { color: #94a3b8; }
@media (max-width: 640px) {
  .code-editor-body { max-height: 280px; }
  .code-editor-gutter { min-width: 30px; }
  .code-editor-toolbar { padding: 7px 10px; }
  .code-editor-btn span { display: none; }
  .code-editor-btn { padding: 6px 8px; }
  .code-editor-btn svg { width: 14px; height: 14px; }
}
.dev-pro-output.output-box {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
  font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
}
.dev-pro-output.hash-list .hash-row {
  background: #0f172a;
  border-color: #334155;
}
.dev-pro-output.hash-list .hash-row b { color: #93c5fd; }
.dev-pro-output.hash-list .hash-row code { color: #e2e8f0; }
.dev-pro-output.hash-list .hash-row button { color: #7dd3fc; }
.dev-pro-output.hash-list .hash-row button:hover { color: #bfdbfe; }
input.dev-mono,
input[readonly].dev-mono {
  font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  letter-spacing: .2px;
}
.code-editor-textarea.rtl-area {
  direction: rtl;
  text-align: right;
}
.code-editor-output .output-box.rtl-area,
.code-editor-output .diff-view.rtl-area {
  direction: rtl;
  text-align: right;
  font-family: var(--font-body);
}
.fl-fullscreen-tool-shell .tool-form {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
}
.fl-fullscreen-tool-shell .code-editor {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.fl-fullscreen-tool-shell .code-editor-body {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  width: 100%;
  max-height: 420px;
  overflow: auto;
}
.fl-fullscreen-tool-shell .code-editor-textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 300px;
  resize: vertical;
  overflow: auto;
}
.fl-fullscreen-tool-shell .code-editor-output .output-box,
.fl-fullscreen-tool-shell .code-editor-output .diff-view {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 300px;
  overflow: auto;
}
.fl-fullscreen-tool-shell .code-editor-gutter {
  width: 42px;
  min-width: 42px;
  overflow: hidden;
}
@media (max-width: 640px) {
  .fl-fullscreen-tool-shell .code-editor-body {
    grid-template-columns: 32px minmax(0,1fr);
    max-height: 360px;
  }
  .fl-fullscreen-tool-shell .code-editor-gutter {
    width: 32px;
    min-width: 32px;
  }
  .fl-fullscreen-tool-shell .code-editor-textarea,
  .fl-fullscreen-tool-shell .code-editor-output .output-box,
  .fl-fullscreen-tool-shell .code-editor-output .diff-view {
    min-height: 220px;
  }
}

/* ===== LIVE CODE PLAYGROUND ===== */
.cp-shell {
  width: 100% !important;
  max-width: 1180px !important;
}
.cp-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}
.cp-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fbfcfe, #f6f7fb);
  border-bottom: 1.5px solid var(--border);
}
.cp-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  background: #eef0f6;
  border-radius: 12px;
  padding: 4px;
}
.cp-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.cp-tab svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cp-tab:hover { background: #e3e6ef; }
.cp-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px -2px rgba(20,20,43,.18), 0 0 0 1.5px var(--primary);
}
.cp-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .12s, box-shadow .15s;
  white-space: nowrap;
}
.cp-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.cp-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.cp-btn:active {
  transform: translateY(1px) scale(.98);
}
.cp-btn-view { display: none; }
.cp-btn-view[data-active="1"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary-dark);
  color: #fff;
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--primary-dark) 65%, transparent);
}
.cp-btn-view[data-active="1"]:hover {
  color: #fff;
  filter: brightness(1.05);
}
.cp-sep {
  width: 1.5px;
  height: 22px;
  background: var(--border);
  border-radius: 2px;
}
.cp-body {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 540px;
}
.cp-editor-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex: 0 0 50%;
  background: #101828;
}
.cp-body.cp-dragging {
  cursor: col-resize;
  user-select: none;
}
.cp-body.cp-dragging .cp-iframe,
.cp-body.cp-dragging .cp-editor { pointer-events: none; }
.cp-editor-wrap {
  display: none;
  grid-template-columns: 44px minmax(0,1fr);
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.cp-editor-wrap.active { display: grid; }
.cp-gutter {
  direction: ltr;
  width: 44px;
  min-width: 44px;
  padding: 14px 8px 14px 0;
  text-align: right;
  white-space: pre;
  overflow: hidden;
  background: #0b1220;
  color: #5b6b85;
  font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
  border-right: 1px solid #1d2a44;
  user-select: none;
}
.cp-editor {
  display: block;
  direction: ltr;
  width: 100%;
  min-width: 0;
  min-height: 540px;
  height: auto;
  flex: 1;
  padding: 14px 16px;
  resize: none;
  overflow: auto;
  box-sizing: border-box;
  border: 0;
  outline: 0;
  background: #101828;
  color: #dbe4f0;
  caret-color: #7dd3fc;
  font: 13.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
  tab-size: 2;
}
.cp-editor::selection { background: rgba(125,211,252,.28); }
.cp-editor::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.cp-editor::-webkit-scrollbar-thumb {
  background: #2b3a58;
  border-radius: 8px;
  border: 2px solid #101828;
}
.cp-editor::-webkit-scrollbar-track { background: transparent; }
.cp-divider {
  flex: 0 0 9px;
  position: relative;
  cursor: col-resize;
  background: #f2f4f8;
  border-inline: 1px solid var(--border);
  touch-action: none;
}
.cp-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 34px;
  border-radius: 3px;
  background: #d3d8e4;
  transition: background .15s, height .15s;
}
.cp-divider:hover::after,
.cp-divider.dragging::after {
  background: var(--primary);
  height: 52px;
}
.cp-divider.dragging { background: #eef1f7; }
.cp-preview-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
  background: #fff;
}
.cp-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fbfcfe;
  border-bottom: 1.5px solid var(--border);
}
.cp-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
  animation: cpPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes cpPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,.08); }
}
.cp-preview-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--ink-soft);
}
.cp-console-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  padding: 5px 11px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.cp-console-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.cp-console-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}
.cp-preview-frame,
.cp-preview-pane iframe {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: #fff;
}
.cp-console {
  direction: ltr;
  max-height: 190px;
  overflow: auto;
  border-top: 1.5px solid var(--border);
  background: #0b1220;
  font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
}
.cp-console[hidden] { display: none; }
.cp-console-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: #0e1526;
  border-bottom: 1px solid #1d2a44;
  color: #8fa3c0;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: .4px;
}
.cp-console-clear {
  border: none;
  background: transparent;
  color: #8fa3c0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.cp-console-clear:hover {
  background: #1d2a44;
  color: #dbe4f0;
}
.cp-console-body {
  padding: 6px 0 10px;
}
.cp-console-empty {
  padding: 10px 14px;
  color: #5b6b85;
  font-style: italic;
}
.cp-console-row {
  padding: 4px 14px;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  unicode-bidi: plaintext;
}
.cp-console-row + .cp-console-row {
  border-top: 1px dashed #1a2438;
}
.cp-console-row.log { color: #cbd5e1; }
.cp-console-row.info { color: #7dd3fc; }
.cp-console-row.warn {
  color: #fbbf24;
  background: rgba(251,191,36,.06);
}
.cp-console-row.error {
  color: #f87171;
  background: rgba(248,113,113,.08);
}
.cp-btn-fs { transition: transform .2s; }
.cp-btn-fs:hover { transform: scale(1.08); }
.cp-app.cp-fullscreen .cp-btn-fs {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary-dark);
  color: #fff;
}
.cp-app.cp-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  border-radius: 0;
  border: none;
  box-shadow: none;
  max-width: none !important;
}
.cp-app.cp-fullscreen .cp-body {
  flex: 1 1 auto;
  min-height: 0;
}
.cp-app.cp-fullscreen .cp-editor,
.cp-app.cp-fullscreen .cp-editor-wrap {
  min-height: 0;
  height: 100%;
}
body.cp-lock { overflow: hidden !important; }
@media (max-width: 760px) {
  .cp-toolbar {
    align-items: stretch;
    padding: 9px 10px;
  }
  .cp-tabs {
    width: 100%;
    order: 1;
    justify-content: space-between;
  }
  .cp-tab {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
  }
  .cp-tab svg { display: none; }
  .cp-actions {
    width: 100%;
    order: 2;
    justify-content: flex-start;
    gap: 6px;
  }
  .cp-btn {
    flex: 1 1 auto;
    padding: 0 10px;
    font-size: 12px;
  }
  .cp-btn-view { display: inline-flex; }
  .cp-sep { display: none; }
  .cp-body {
    flex-direction: column;
    min-height: 0;
  }
  .cp-divider { display: none; }
  .cp-editor-pane { flex: 1 1 auto; }
  .cp-editor-wrap { min-height: 320px; }
  .cp-editor { min-height: 320px; }
  .cp-preview-pane {
    display: none;
    min-height: 380px;
  }
  body.cp-show-preview .cp-preview-pane {
    display: flex;
    flex: 1 1 auto;
  }
  body.cp-show-preview .cp-editor-pane { display: none; }
}
@media (max-width: 380px) {
  .cp-tab {
    padding: 8px 6px;
    font-size: 12px;
  }
  .cp-btn {
    font-size: 11px;
    padding: 0 8px;
  }
}
.article-cat-pill {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  color: #000 !important;
}
.article-art,
.trust-ico {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}
.tool-card-shell .dropzone > button:not(.dz-gdrive-btn),
.tool-card-shell .dropzone .dz-main-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  border-color: var(--primary-dark) !important;
  color: #fff !important;
}
.tool-card-shell .tool-actions .btn-accent {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}
.result-actions .btn-accent {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}

/* ---- RELATED ARTICLE ---- */
.tool-related-article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 900px;
  margin: 40px auto 0;
  padding: 18px 22px;
  background: linear-gradient(180deg, var(--bg-soft), #fff 60%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.tool-related-article .tra-text {
  flex: 1;
  min-width: 200px;
}
.tool-related-article .tra-text h2 {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--ink);
  text-align: start;
  margin-bottom: 3px;
}
.tool-related-article .tra-text p {
  font-size: 12.8px;
  color: var(--ink-faint);
  font-weight: 600;
  margin: 0;
}
.tool-related-article .tra-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary-dark);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  transition: .18s;
}
.tool-related-article .tra-link svg {
  width: 13px;
  height: 13px;
  transition: transform .18s;
}
.tool-related-article .tra-link:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  transform: translateY(-1px);
}
.tool-related-article .tra-link:hover svg { transform: translateX(-3px); }
html[dir=rtl] .tool-related-article .tra-link svg { transform: scaleX(-1); }
html[dir=rtl] .tool-related-article .tra-link:hover svg { transform: scaleX(-1) translateX(-3px); }
@media (max-width: 480px) {
  .tool-related-article {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-md);
  }
  .tool-related-article .tra-link { justify-content: center; }
}
.pdf-tool-page .tool-related-article { max-width: 1040px; }

/* ---- RELATED TOOLS ---- */
.related-tools {
  display: none;
  max-width: 900px;
  margin: 56px auto 0;
  padding: 26px 22px 28px;
  background: linear-gradient(180deg, var(--bg-soft), #fff 60%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
}
.related-tools.show {
  display: block;
  animation: relToolsIn .5s cubic-bezier(.2,.8,.2,1);
}
@keyframes relToolsIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.related-tools-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.related-tools-ico {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 20px -10px rgba(94,143,99,0.55);
}
.related-tools-ico svg {
  width: 20px;
  height: 20px;
}
.related-tools-head-text {
  flex: 1;
  min-width: 160px;
}
.related-tools h2 {
  font-size: 17.5px;
  font-weight: 900;
  color: var(--ink);
  text-align: start;
  margin-bottom: 3px;
}
.related-tools-head-text p {
  font-size: 12.8px;
  color: var(--ink-faint);
  font-weight: 600;
}
.related-tools-more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary-dark);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  transition: .18s;
  margin-inline-start: auto;
}
.related-tools-more svg {
  width: 13px;
  height: 13px;
  transition: transform .18s;
}
.related-tools-more:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  transform: translateY(-1px);
}
.related-tools-more:hover svg { transform: translateX(-3px); }
html[dir=rtl] .related-tools-more svg { transform: scaleX(-1); }
html[dir=rtl] .related-tools-more:hover svg { transform: scaleX(-1) translateX(-3px); }
.related-tools .tool-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.related-tools .tool-ico {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  box-shadow: 0 10px 22px -10px rgba(94,143,99,0.5) !important;
}
@media (min-width: 640px) {
  .related-tools .tool-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .related-tools .tool-grid { grid-template-columns: repeat(4, 1fr); }
}
.related-tools .tool-card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 15px;
  background: #fff;
}
.related-tools .tool-card .tool-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
}
.related-tools .tool-card .tool-ico svg {
  width: 18px;
  height: 18px;
}
.related-tools .tool-card .rt-name {
  flex: 1;
  min-width: 0;
  font-size: 13.3px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.related-tools .tool-card .rt-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ink-faint);
  transition: transform .18s, color .18s;
}
.related-tools .tool-card .rt-arrow svg {
  width: 14px;
  height: 14px;
}
.related-tools .tool-card:hover .rt-arrow {
  color: var(--primary);
  transform: translateX(-3px);
}
html[dir=rtl] .related-tools .tool-card .rt-arrow svg { transform: scaleX(-1); }
html[dir=rtl] .related-tools .tool-card:hover .rt-arrow { transform: scaleX(-1) translateX(-3px); }
@media (max-width: 480px) {
  .related-tools {
    padding: 20px 16px 22px;
    border-radius: var(--radius-lg);
  }
  .related-tools-more {
    width: 100%;
    justify-content: center;
    margin-inline-start: 0;
  }
  .related-tools .tool-card {
    padding: 11px 12px;
  }
  .related-tools .tool-card .rt-name { font-size: 12.6px; }
}
.pdf-tool-page .related-tools { max-width: 1040px; }

/* ---- QR TOOL ---- */
.qr-type-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.qr-type-tabs::-webkit-scrollbar { display: none; }
.qr-type-tabs button {
  flex: 0 0 auto;
  min-width: auto;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-weight: 800;
  font-size: 12.8px;
  color: var(--ink-soft);
  transition: .15s;
  font-family: var(--font-body);
}
.qr-type-tabs button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-soft);
}
.qr-hist-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 4px;
  -webkit-overflow-scrolling: touch;
}
.qr-hist-item {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  text-align: center;
  cursor: pointer;
}
.qr-hist-item span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-faint);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qr-hist-item button {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(17,24,39,.15);
  cursor: pointer;
}
.qr-hist-item button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}
.qr-chk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.qr-chk-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.qr-dl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 420px;
}
.qr-dl-grid .btn {
  width: 100%;
  max-width: none;
  padding: 11px 6px;
  font-size: 12.5px;
}
@media (max-width: 420px) {
  .qr-dl-grid { grid-template-columns: repeat(2, 1fr); }
}
.qr-scan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.qr-preview #qrHolder canvas,
.qr-preview #qrHolder svg {
  max-width: 100%;
  height: auto;
}
.qr-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 22px;
}
.qr-section {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  overflow: hidden;
}
.qr-section[open] {
  background: #fff;
  border-color: var(--primary);
}
.qr-section summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  border-bottom: none;
  margin-bottom: 0;
}
.qr-section summary::-webkit-details-marker { display: none; }
.qr-section summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-faint);
  transition: transform .18s;
}
.qr-section[open] summary::after {
  content: '−';
  color: var(--primary);
}
.qr-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qr-section-opt {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}
.qr-section[open] .qr-section-opt { background: #fff; }
.qr-section-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 16px 16px;
}
.qr-detect-badge {
  margin: 0 22px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-faint);
  background: var(--bg-soft);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  transition: .2s;
}
.qr-detect-badge.on {
  color: var(--primary);
  background: var(--primary-50);
  border-style: solid;
  border-color: var(--primary);
}
.qr-preset-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
}
.qr-preset-btn {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
.qr-preset-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}
.qr-preset-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: block;
}
#resultBox .copy-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  justify-content: flex-start;
}
#resultBox #shortUrlOut {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  height: 48px;
  font-size: 14.5px;
  font-weight: 700;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  white-space: nowrap;
}
#copyShortBtn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  box-shadow: 0 10px 20px -10px rgba(94,143,99,0.5);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
#copyShortBtn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 14px 26px -10px rgba(94,143,99,0.55);
}
#copyShortBtn:active {
  transform: translateY(0) scale(.97);
}
#copyShortBtn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
#copyShortBtn.is-copied {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 10px 20px -10px rgba(22,163,74,.5);
}
@media (max-width: 420px) {
  #resultBox .copy-row { flex-wrap: wrap; }
  #resultBox #shortUrlOut {
    flex-basis: 100%;
    order: 1;
  }
  #copyShortBtn {
    order: 2;
    flex: 1;
    justify-content: center;
  }
}

/* ---- CATEGORY OVERRIDES (icons excluded from primary) ---- */
#cat-pdf .tool-card,
#cat-pdf .cat-ico-lg { --c1: #3B82F6 !important; --c2: #1D4ED8 !important; }
#cat-image .tool-card,
#cat-image .cat-ico-lg { --c1: #8B5CF6 !important; --c2: #6D28D9 !important; }
#cat-ocr .tool-card,
#cat-ocr .cat-ico-lg { --c1: #14B8A6 !important; --c2: #0F766E !important; }
#cat-developer .tool-card,
#cat-developer .cat-ico-lg { --c1: #64748B !important; --c2: #334155 !important; }
#cat-seo .tool-card,
#cat-seo .cat-ico-lg { --c1: #22C55E !important; --c2: #15803D !important; }
#cat-text .tool-card,
#cat-text .cat-ico-lg { --c1: #06B6D4 !important; --c2: #0E7490 !important; }
#cat-calculator .tool-card,
#cat-calculator .cat-ico-lg { --c1: #D946EF !important; --c2: #A21CAF !important; }
#cat-url .tool-card,
#cat-url .cat-ico-lg { --c1: #F97316 !important; --c2: #C2410C !important; }
.tool-ico-badge {
  font-weight: 900;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: -.3px;
  direction: ltr;
}

/* ===== SEO CONTENT (consistent card design) ===== */
.fastols-seo-content {
  background: var(--bg-soft, #F6F7FB);
  padding: 8px 0 56px;
  margin-top: 36px;
}
.fastols-seo-content .container {
  padding-left: 20px;
  padding-right: 20px;
}
.fastols-seo-content section:first-child { margin-top: 28px; }
.fastols-seo-content .tool-about h2,
.fastols-seo-content .tool-howto h2,
.fastols-seo-content .tool-faq h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}
.fastols-seo-content .tool-about h2::before,
.fastols-seo-content .tool-howto h2::before,
.fastols-seo-content .tool-faq h2::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
}
.fastols-seo-content .tool-about {
  background: var(--bg, #fff);
  border: 1.5px solid var(--border, #E8E9F1);
  border-radius: var(--radius-lg, 20px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(20,20,43,.06));
  padding: 26px 28px;
  margin: 24px auto 0;
}
.fastols-seo-content .tool-about > h2::before {
  content: "i";
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  font-style: italic;
}
.fastols-seo-content .tool-howto > h2::before {
  content: "↓";
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}
.fastols-seo-content .tool-faq > h2::before {
  content: "?";
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.fastols-seo-content .tool-about.tool-limits {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 28px auto 0;
}
.fastols-seo-content .tool-about.tool-limits h2::before {
  content: "!";
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.fastols-seo-content .tool-about.tool-limits .howto-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.fastols-seo-content .tool-about.tool-limits .howto-step {
  background: #fff;
  border: 1.5px solid var(--border, #E8E9F1);
  border-radius: var(--radius-md, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(20,20,43,.06));
  padding: 18px 18px 16px;
  align-items: flex-start;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.fastols-seo-content .tool-about.tool-limits .howto-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.fastols-seo-content .tool-about.tool-limits .howto-step span {
  font-size: 13.2px;
  line-height: 1.75;
  color: var(--ink-soft);
}
@media (max-width: 900px) {
  .fastols-seo-content .tool-about.tool-limits .howto-list {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .fastols-seo-content .tool-about.tool-limits .howto-list {
    grid-template-columns: 1fr;
  }
}
.fastols-seo-content .tool-howto {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 28px auto 0;
}
.fastols-seo-content .tool-howto .howto-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fastols-seo-content .tool-howto .howto-step {
  background: #fff;
  border: 1.5px solid var(--border, #E8E9F1);
  border-radius: var(--radius-md, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(20,20,43,.06));
  padding: 18px 18px 18px 54px;
  position: relative;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
html[dir=rtl] .fastols-seo-content .tool-howto .howto-step {
  padding: 18px 54px 18px 18px;
}
.fastols-seo-content .tool-howto .howto-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.fastols-seo-content .tool-howto .howto-step span:last-child {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 600;
}
.fastols-seo-content .tool-howto .howto-num {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px;
  width: 26px;
  height: 26px;
  font-size: 12.5px;
}
@media (max-width: 640px) {
  .fastols-seo-content .tool-howto .howto-list {
    grid-template-columns: 1fr;
  }
}
.fastols-seo-content .tool-faq {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 28px auto 40px;
  counter-reset: faqIdx;
}
.fastols-seo-content .faq-item {
  background: #fff;
  border: 1.5px solid var(--border, #E8E9F1);
  border-radius: var(--radius-md, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(20,20,43,.06));
  padding: 18px 34px 18px 18px;
  margin-bottom: 12px;
  position: relative;
  transition: box-shadow .18s, border-color .18s;
}
html[dir=rtl] .fastols-seo-content .faq-item {
  padding: 18px 18px 18px 34px;
}
.fastols-seo-content .faq-item:last-child { margin-bottom: 0; }
.fastols-seo-content .faq-item:hover {
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.fastols-seo-content .faq-item::after {
  content: "";
  position: absolute;
  top: 22px;
  inset-inline-end: 16px;
  width: 9px;
  height: 9px;
  border-inline-end: 2px solid color-mix(in srgb, var(--primary) 55%, var(--ink-faint, #9aa1af));
  border-bottom: 2px solid color-mix(in srgb, var(--primary) 55%, var(--ink-faint, #9aa1af));
  transform: rotate(45deg);
}
.fastols-seo-content .faq-item h3 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 800;
}
.fastols-seo-content .faq-item h3::before {
  content: counter(faqIdx);
  counter-increment: faqIdx;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--primary) 14%, #fff);
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.fastols-seo-content .faq-item p {
  padding-inline-start: 32px;
  font-size: 13.5px;
  line-height: 1.75;
}
.fastols-seo-content .tool-related-links {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 28px auto 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  transition: .22s;
  box-shadow: 0 1px 4px -2px rgba(0,0,0,.05);
  position: relative;
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,.22);
  transform: translateY(-3px);
}
.related-card .tool-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c1, #3B82F6), var(--c2, #1D4ED8));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.3);
}
.related-card .tool-ico svg {
  width: 19px;
  height: 19px;
  color: #fff;
}
.related-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.related-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}
.related-card-desc {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-faint);
}
.related-card:hover .related-card-title { color: var(--primary); }
.related-card-arrow {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
  flex-shrink: 0;
  margin-inline-start: auto;
  transition: .22s;
}
.related-card:hover .related-card-arrow {
  color: var(--primary);
  transform: translateX(-3px);
}
[dir="ltr"] .related-card:hover .related-card-arrow { transform: translateX(3px); }
@media (max-width: 640px) {
  .fastols-seo-content .tool-about {
    padding: 20px 18px;
    border-radius: var(--radius-md, 14px);
  }
  .fastols-seo-content .tool-about.tool-limits .howto-step,
  .fastols-seo-content .tool-howto .howto-step,
  .fastols-seo-content .faq-item {
    padding-left: 16px;
    padding-right: 16px;
  }
  .fastols-seo-content .tool-howto .howto-step {
    padding-inline-start: 52px;
  }
}

/* ===== MOBILE TOOL SETTINGS ===== */
.tool-settings-fab,
.tool-settings-backdrop,
.tool-settings-head { display: none !important; }
.tool-settings-body { display: block; }
@media (max-width: 991px) {
  .tool-card-shell.has-file .tool-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    flex-direction: row;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 22px -16px rgba(20,20,43,.24);
  }
  .tool-card-shell.has-file .tool-actions .btn {
    width: 100%;
    max-width: none;
  }
  .tool-card-shell.has-file .tool-settings-body .split-options,
  .tool-card-shell.has-file .tool-settings-body .compress-options,
  .tool-card-shell.has-file .tool-settings-body .protect-options,
  .tool-card-shell.has-file .tool-settings-body .esign-builder,
  .tool-card-shell.has-file .tool-settings-body .merge-pagenum-toggle,
  .tool-card-shell.has-file .tool-settings-body .calc-grid,
  .tool-card-shell.has-file .tool-settings-body .quality-panel,
  .tool-card-shell.has-file .tool-settings-body .progress-wrap,
  .tool-card-shell.has-file .tool-settings-body .pw-opts,
  .tool-card-shell.has-file .tool-settings-body .color-row,
  .tool-card-shell.has-file .tool-settings-body .strength-bar,
  .tool-card-shell.has-file .tool-settings-body .color-preview,
  .tool-card-shell.has-file .tool-settings-body .page-org-list,
  .tool-card-shell.has-file .tool-settings-body .tool-options {
    margin-inline: 0;
  }
  .tool-card-shell.is-busy .tool-actions,
  .tool-card-shell.is-result .tool-actions { display: none !important; }
}
@media (min-width: 992px) {
  .tool-settings-body { display: contents; }
}

/* ===== RESPONSIVE FIXES (touch & desktop) ===== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (hover: none) and (pointer: coarse) {
  html { font-size: 118%; }
  input, select, textarea,
  .tool-form input, .tool-form select, .tool-form textarea,
  .field input, .field select,
  .pw-input-wrap input, .range-field input, .fixed-size-row input {
    font-size: 16px !important;
  }
  .btn {
    min-height: 44px;
    padding: 15px 28px;
    font-size: 16px;
  }
  .btn-lg {
    min-height: 50px;
    padding: 17px 32px;
  }
  .btn-sm {
    min-height: 38px;
    padding: 9px 16px;
  }
  .filter-tab, .chip, .pill, .continue-to-chip, .share-tool-btn, .lang-switch-btn, .lang-switch,
  .mega-trigger, .main-nav a {
    min-height: 40px;
    padding-top: 11px;
    padding-bottom: 11px;
  }
  .burger, .mobile-close { width: 46px; height: 46px; }
  .file-item button, .thumb-card .thumb-remove, .thumb-card .thumb-zoom,
  .thumb-card .thumb-check, .range-remove, .pw-toggle, .fl-tb-btn,
  .thumb-card .thumb-rot-btn {
    width: 36px;
    height: 36px;
  }
  .file-item button svg, .thumb-card .thumb-remove, .thumb-card .thumb-zoom { font-size: 14px; }
  .compress-level-card { padding: 20px 44px 16px; }
  .split-mode-btn { padding: 20px 10px 16px; }
  .split-range-btn { padding: 16px 18px; }
  .compress-level-card .cl-check, .split-mode-btn .split-mode-check { width: 22px; height: 22px; }
  input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; }
  input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; }
  .trim-range::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; }
  .trim-range::-moz-range-thumb { width: 26px; height: 26px; }
  .range-field input { padding: 13px 14px; font-size: 16px; }
  .add-range-btn { padding: 16px; }
  .footer-col a, .mobile-cat-link, .search-suggest a, .lang-switch-panel a {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .tool-card { padding: 30px 26px; }
}

/* ===== INFO MENU ===== */
.info-menu-dd { position: relative; flex-shrink: 0; }
.info-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink-soft, #5b6270);
  cursor: pointer;
  transition: .2s;
}
.info-menu-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.info-menu-btn svg {
  width: 21px;
  height: 21px;
}
.info-menu-dd.open .info-menu-btn {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}
.info-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(262px, 88vw);
  z-index: 60;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: .18s;
}
.info-menu-dd.open .info-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.info-menu-panel a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-soft, #5b6270);
  text-decoration: none;
  transition: .15s;
}
.info-menu-panel a svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--ink-faint, #9aa1af);
}
.info-menu-panel a:hover {
  color: var(--primary);
  background: var(--bg-soft, #f3f4f6);
}
.info-menu-panel a:hover svg { color: var(--primary); }
.mobile-panel-top .info-menu-dd { margin-inline-start: 8px; }
.header-cta .lang-switch-dd.lang-switch-desktop { display: none; }
@media (min-width: 900px) {
  .header-cta .lang-switch-dd.lang-switch-desktop { display: block; }
}
@media (max-width: 480px) {
  .info-menu-panel {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 16px;
    right: 16px;
    inset-inline-end: auto;
    width: auto;
  }
}

/* ===== EDIT PDF (immersive editor) ===== */
.edpf-workspace {
  display: none;
  position: fixed;
  top: var(--header-h, 72px);
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: #f0f2f5;
  flex-direction: column;
  overflow: hidden;
}
.edpf-workspace.show { display: flex; }
.edpf-topbar {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0; min-height: 52px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); z-index: 10;
}
.edpf-topbar-left, .edpf-topbar-right { display: flex; align-items: center; gap: 10px; }
.edpf-exit {
  flex-shrink: 0; width: 34px; height: 34px;
  border-radius: 50%; border: 1.5px solid #e2e8f0;
  background: #fff; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; cursor: pointer;
}
.edpf-exit:hover { border-color: var(--primary-dark); color: var(--primary-dark); background: var(--primary-50); }
.edpf-exit svg { width: 16px; height: 16px; }
.edpf-filename {
  font-size: 14px; font-weight: 700; color: #1e293b;
  max-width: 260px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.edpf-topbar-tool {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid #e2e8f0; background: #fff;
  color: #64748b; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  transition: all 0.15s; cursor: pointer;
}
.edpf-topbar-tool:hover { border-color: var(--primary); color: var(--primary); background: #fef2f2; }
.edpf-topbar-tool svg { width: 16px; height: 16px; }
.edpf-topbar-right .btn { padding: 8px 18px; font-size: 13px; border-radius: 8px; font-weight: 600; }
.edpf-topbar-right .btn svg { width: 14px; height: 14px; }
.edpf-searchbar {
  display: none; align-items: center; gap: 8px;
  padding: 8px 20px; background: #fff;
  border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.edpf-searchbar.show { display: flex; }
.edpf-searchbar input {
  flex: 1; min-width: 0;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 7px 12px; font-size: 13px;
  font-family: inherit; background: #f8fafc; outline: 0;
  transition: border-color 0.15s;
}
.edpf-searchbar input:focus { border-color: var(--primary); background: #fff; }
.edpf-search-count {
  font-size: 12px; font-weight: 700; color: #94a3b8;
  white-space: nowrap; flex-shrink: 0; min-width: 50px; text-align: center;
}
.edpf-searchbar button {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 6px; border: 1.5px solid #e2e8f0;
  background: #fff; color: #64748b; font-size: 14px;
  line-height: 1; display: flex; align-items: center;
  justify-content: center; cursor: pointer;
  transition: all 0.15s;
}
.edpf-searchbar button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.edpf-searchbar button:disabled { opacity: 0.4; cursor: not-allowed; }
.edpf-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 20px; background: #fff;
  border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
  overflow-x: auto; scrollbar-width: thin;
}
.edpf-toolbar::-webkit-scrollbar { height: 4px; }
.edpf-toolbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.edpf-tgroup { display: flex; align-items: center; gap: 3px; }
.edpf-sep {
  width: 1px; align-self: stretch; min-height: 28px;
  background: #e2e8f0; flex-shrink: 0; margin: 0 4px;
}
.edpf-tool {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  min-width: 52px; padding: 6px 10px;
  border: 1.5px solid transparent; border-radius: 10px;
  background: transparent; color: #64748b;
  font-family: inherit; transition: all 0.15s; flex-shrink: 0;
  cursor: pointer;
}
.edpf-tool svg {
  width: 18px; height: 18px; fill: none;
  stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.edpf-tool-label { font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.edpf-tool:hover { background: #f1f5f9; color: #1e293b; }
.edpf-tool.active {
  background: linear-gradient(135deg, rgba(94,143,99,0.08), rgba(94,143,99,0.12));
  border-color: rgba(94,143,99,0.3);
  color: var(--primary);
}
.edpf-tool:disabled { opacity: 0.35; cursor: not-allowed; }
.edpf-shape-menu {
  display: none; position: absolute;
  top: calc(100% + 6px); inset-inline-start: 0; z-index: 30;
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.18);
  padding: 6px; gap: 3px; flex-wrap: wrap; width: 220px;
}
.edpf-shape-menu.show { display: flex; }
.edpf-shape-menu button {
  width: 38px; height: 38px; border-radius: 8px;
  border: none; background: transparent; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.12s;
}
.edpf-shape-menu button:hover { background: #f1f5f9; color: var(--primary); }
.edpf-shape-menu button svg {
  width: 18px; height: 18px; fill: none;
  stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.edpf-style-controls {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-inline-start: auto; flex-shrink: 0;
}
.edpf-style-controls label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: #64748b;
  white-space: nowrap;
}
.edpf-style-controls input[type=color] {
  width: 28px; height: 28px; padding: 2px;
  border: 1.5px solid #e2e8f0; border-radius: 6px;
  background: #fff; cursor: pointer;
}
.edpf-style-controls input[type=range] { width: 80px; margin: 0; }
.edpf-style-controls input[type=number] {
  width: 52px; border: 1.5px solid #e2e8f0;
  border-radius: 6px; padding: 5px 6px;
  font-size: 12px; font-family: inherit;
  outline: 0; background: #fff; text-align: center;
}
.edpf-style-controls input[type=number]:focus { border-color: var(--primary); }
.edpf-style-controls select {
  border: 1.5px solid #e2e8f0; border-radius: 6px;
  padding: 4px 6px; font-size: 12px; font-family: inherit;
  outline: 0; background: #fff; color: #334155; cursor: pointer;
}
.edpf-style-controls select:focus { border-color: var(--primary); }
.edpf-fmt-toggle {
  border: 1.5px solid #e2e8f0; border-radius: 6px;
  padding: 3px 8px 3px 6px; cursor: pointer; background: #fff;
  transition: background .12s, border-color .12s;
}
.edpf-fmt-toggle:has(input:checked) { background: #eef2ff; border-color: var(--primary); color: var(--primary); }
.edpf-fmt-toggle input[type=checkbox] { width: 13px; height: 13px; cursor: pointer; margin: 0; accent-color: var(--primary); }
.edpf-fmt-toggle b, .edpf-fmt-toggle i, .edpf-fmt-toggle u { font-size: 13px; font-style: normal; }
.edpf-fmt-toggle i { font-style: italic; }
.edpf-adbar {
  display: none; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 6px 20px; border-bottom: 1px solid #e2e8f0;
  background: #fff; flex-shrink: 0;
}
.edpf-body {
  display: flex; flex: 1; align-items: stretch;
  overflow: hidden; min-height: 0;
}
.edpf-sidebar {
  flex: 0 0 200px; width: 200px;
  display: flex; flex-direction: column;
  background: #fff; border-inline-start: 1px solid #e2e8f0;
  overflow-y: auto; flex-shrink: 0;
}
.edpf-sidebar-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: #334155;
  padding: 12px 14px 8px; border-bottom: 1px solid #f1f5f9;
}
.edpf-sidebar-title svg {
  width: 15px; height: 15px; fill: none;
  stroke: currentColor; stroke-width: 1.8; flex-shrink: 0;
}
.edpf-sidebar-actions {
  display: flex; gap: 6px; padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
}
.edpf-sidebar-actions button {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 8px 4px;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; color: #64748b;
  font-family: inherit; font-size: 10px;
  font-weight: 600; transition: all 0.15s; cursor: pointer;
}
.edpf-sidebar-actions button:hover {
  border-color: var(--primary);
  color: var(--primary); background: #fff;
}
.edpf-sidebar-actions button.danger:hover { border-color: var(--primary-dark); color: var(--primary-dark); }
.edpf-sidebar-actions button svg {
  width: 16px; height: 16px; fill: none;
  stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.edpf-thumbs {
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; padding: 10px;
}
.edpf-thumb {
  position: relative; flex-shrink: 0; width: 100%;
  border: 2px solid #e2e8f0; border-radius: 8px;
  overflow: hidden; background: #f8fafc;
  cursor: grab; transition: all 0.15s;
}
.edpf-thumb canvas { display: block; width: 100%; height: auto; }
.edpf-thumb:hover { border-color: #94a3b8; }
.edpf-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94,143,99,0.15);
}
.edpf-thumb.over { border-color: var(--primary); border-style: dashed; }
.edpf-thumb-num {
  position: absolute; bottom: 5px; inset-inline-end: 5px;
  background: rgba(17,24,39,0.72); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px; line-height: 1.4;
}
.edpf-main {
  flex: 1 1 auto; min-width: 0; position: relative;
  display: flex; flex-direction: column;
}
.edpf-stage-wrap {
  flex: 1; display: flex; align-items: flex-start;
  justify-content: center; overflow: auto;
  padding: 28px; background: #e9ebf1;
}
.edpf-page-frame {
  position: relative; background: #fff;
  box-shadow: 0 12px 34px -12px rgba(20,20,43,0.35);
  flex-shrink: 0;
}
.edpf-page-frame canvas { display: block; }
.edpf-overlay { position: absolute; inset: 0; overflow: hidden; }
.edpf-page-pill {
  position: sticky; bottom: 14px; left: 50%;
  transform: translateX(-50%); display: flex;
  align-items: center; gap: 10px; margin: 0 auto;
  padding: 8px 14px; width: max-content;
  background: rgba(20,20,43,0.82); backdrop-filter: blur(6px);
  border-radius: 999px; box-shadow: 0 8px 24px -8px rgba(0,0,0,0.3);
  z-index: 5;
}
.edpf-page-pill button {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.12);
  color: #fff; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  transition: 0.15s; cursor: pointer;
}
.edpf-page-pill button:hover:not(:disabled) { background: rgba(255,255,255,0.25); }
.edpf-page-pill button:disabled { opacity: 0.35; cursor: not-allowed; }
.edpf-page-pill button svg {
  width: 15px; height: 15px; fill: none;
  stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.edpf-page-pill span {
  font-size: 12.5px; font-weight: 700;
  color: #fff; min-width: 56px; text-align: center;
}
.edpf-obj {
  position: absolute; box-sizing: border-box;
  outline: 1.5px dashed transparent;
  transition: outline-color 0.12s; cursor: move;
  user-select: none;
}
.edpf-obj:hover { outline-color: rgba(94,143,99,0.45); }
.edpf-obj.selected { outline: 1.5px dashed var(--primary); }
.edpf-obj img {
  width: 100%; height: 100%;
  object-fit: contain; pointer-events: none; display: block;
}
.edpf-obj-text {
  width: 100%; height: 100%;
  white-space: pre-wrap; word-break: break-word;
  line-height: 1.25; outline: 0; padding: 2px;
}
.edpf-obj-svg { width: 100%; height: 100%; }
.edpf-obj-svg svg { display: block; width: 100%; height: 100%; }
.edpf-obj-whiteout { background: #fff; }
.edpf-obj-note {
  background: #FEF3C7; border: 1px solid #F5D98B;
  border-radius: 4px;
  box-shadow: 0 3px 10px -4px rgba(0,0,0,0.25); padding: 2px;
}
.edpf-obj-move, .edpf-obj-del, .edpf-obj-resize {
  display: none; position: absolute; border: none;
  padding: 0; align-items: center; justify-content: center;
  z-index: 5;
}
.edpf-obj.selected .edpf-obj-move,
.edpf-obj.selected .edpf-obj-del,
.edpf-obj.selected .edpf-obj-resize { display: flex; }
.edpf-obj-move {
  top: -12px; inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff;
  cursor: move; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.edpf-obj-move svg {
  width: 12px; height: 12px; fill: none;
  stroke: currentColor; stroke-width: 2;
}
.edpf-obj-del {
  top: -10px; inset-inline-end: -10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.edpf-obj-del:hover { background: var(--primary-dark); }
.edpf-obj-resize {
  bottom: -7px; inset-inline-end: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--primary);
  cursor: nwse-resize; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.edpf-textrun-hit:hover { background: rgba(37,99,235,0.12) !important; }
.edpf-obj-resize-w {
  display: none; position: absolute; z-index: 5;
  inset-inline-end: -6px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 20px; border-radius: 3px;
  background: #fff; border: 2px solid var(--primary);
  cursor: ew-resize; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.edpf-obj.selected .edpf-obj-resize-w { display: flex; }
.edpf-marquee {
  position: absolute; border: 1.5px dashed var(--primary);
  background: rgba(94,143,99,0.1); pointer-events: none; z-index: 20;
}
.edpf-group-align {
  display: none; align-items: center; gap: 2px;
}
.edpf-group-align.show { display: flex; }
.edpf-group-align button {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border,#ddd);
  background: #fff; cursor: pointer; font-size: 14px; line-height: 1;
}
.edpf-group-align button:hover { border-color: var(--primary); color: var(--primary); }
.edpf-info-banner {
  display: none; align-items: center; gap: 10px;
  background: #EFF6FF; border-bottom: 1px solid #BFDBFE; color: #1E40AF;
  padding: 8px 14px; font-size: 12.5px; line-height: 1.4;
}
.edpf-info-banner.show { display: flex; }
.edpf-info-banner span { flex: 1; }
.edpf-info-dismiss { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12px; cursor: pointer; }
.edpf-info-banner button#edpfEditTextInfoClose {
  border: none; background: transparent; color: #1E40AF; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 4px;
}
.edpf-search-hl {
  position: absolute;
  background: rgba(250,204,21,0.55);
  outline: 2px solid #F59E0B;
  pointer-events: none; border-radius: 2px;
}
.tool-card-shell.edpf-immersive { max-width: 100%; padding: 0; margin: 0; }
body.edpf-immersive {
  overflow: hidden;
  position: fixed; width: 100%; height: 100%;
}
body.edpf-immersive .site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 101;
}
body.edpf-immersive .edpf-workspace {
  top: var(--header-h, 72px);
}
@media (max-width: 900px) {
  .edpf-body { flex-direction: column; }
  .edpf-sidebar {
    width: 100%; flex: 0 0 auto;
    border-inline-start: none;
    border-top: 1px solid #e2e8f0;
    order: 2; max-height: 160px;
  }
  .edpf-thumbs {
    flex-direction: row; overflow-x: auto;
    overflow-y: hidden; padding: 8px;
  }
  .edpf-thumb {
    flex: 0 0 80px; width: 80px;
  }
  .edpf-main { order: 1; }
  .edpf-tool-label { display: none; }
  .edpf-tool { min-width: 38px; padding: 6px; }
  .edpf-style-controls {
    margin-inline-start: 0; width: 100%; padding-top: 6px;
  }
  .edpf-filename { max-width: 100px; }
  .edpf-topbar { padding: 6px 12px; min-height: 46px; }
}
@media (max-width: 600px) {
  .edpf-topbar-tool { width: 30px; height: 30px; }
  .edpf-topbar-right .btn { padding: 6px 12px; font-size: 12px; }
  .edpf-toolbar { padding: 6px 10px; }
  .edpf-stage-wrap { padding: 12px; }
}
.edpf-workspace.edpf-done .edpf-topbar,
.edpf-workspace.edpf-done .edpf-searchbar,
.edpf-workspace.edpf-done .edpf-toolbar,
.edpf-workspace.edpf-done .edpf-adbar,
.edpf-workspace.edpf-done .edpf-body { display: none; }
.edpf-workspace.edpf-done {
  min-height: 60vh;
  align-items: center;
  justify-content: center;
  padding: 40px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.edpf-workspace.edpf-done .progress-wrap,
.edpf-workspace.edpf-done .result-panel {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}
.edpf-workspace.edpf-done .result-panel { margin-block: auto; }

/* ---- GOOGLE DRIVE BUTTON ---- */
.dz-gdrive-wrap {
  order: 1;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  width: auto;
  flex: 0 0 auto;
}
.dz-gdrive-sep { display: none; }
.dz-gdrive-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--border);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(17,24,39,.22);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.dz-gdrive-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 26px -12px rgba(17,24,39,.32);
  transform: translateY(-2px);
}
.dz-gdrive-btn:active { transform: translateY(0); }
.dz-gdrive-ico {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* ===== RESULT HERO (PDF style) ===== */
.result-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap-reverse;
  text-align: start;
  margin-bottom: 22px;
}
.result-hero-text {
  flex: 1;
  min-width: 220px;
  text-align: center;
}
@media (min-width: 560px) {
  .result-hero-text { text-align: start; }
}
.result-hero-text h2,
.result-hero-text h3 {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 8px;
}
.result-hero-sub {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.result-hero-sub b {
  color: #16a34a;
  font-weight: 900;
}
.result-hero-sub .sizes {
  display: inline-block;
  direction: ltr;
  font-weight: 700;
  color: var(--ink);
}
.percent-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--primary) calc(var(--pct, 0) * 1%), #eef0f6 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
}
.percent-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
}
.percent-ring-in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}
.percent-ring-in b {
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
}
.percent-ring-in span {
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-faint);
}
.result-continue {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.result-continue-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-faint);
  letter-spacing: .03em;
  margin-bottom: 12px;
  text-align: center;
}
.result-continue-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 520px;
  margin: 0 auto;
}
.result-continue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  transition: .15s;
  color: var(--ink);
}
.result-continue-item:hover { background: var(--bg-soft); }
.result-continue-item .rci-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  color: #fff;
}
.result-continue-item .rci-ico svg {
  width: 16px;
  height: 16px;
}
.result-continue-item .rci-label {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
}
.result-continue-item .rci-arrow {
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
  flex-shrink: 0;
  transform: scaleX(-1);
}
html[dir=rtl] .result-continue-item .rci-arrow { transform: none; }
.trust-banner {
  margin-top: 22px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
}
.trust-banner-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.trust-banner-title svg {
  width: 18px;
  height: 18px;
  color: #16a34a;
  flex-shrink: 0;
}
.trust-banner p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 14px;
}
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
}
.trust-badge svg {
  width: 15px;
  height: 15px;
  color: #16a34a;
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .result-hero { gap: 16px; }
  .percent-ring {
    width: 80px;
    height: 80px;
  }
  .percent-ring-in b { font-size: 16px; }
}

/* ===== FULLSCREEN TOOL (Live Code Playground only) ===== */
body.fl-fullscreen-tool { overflow: hidden; }
body.fl-fullscreen-tool .tool-page-hero,
body.fl-fullscreen-tool .breadcrumb,
body.fl-fullscreen-tool .tool-intro,
body.fl-fullscreen-tool .tool-about,
body.fl-fullscreen-tool .tool-faq,
body.fl-fullscreen-tool .tool-howto,
body.fl-fullscreen-tool .related-tools,
body.fl-fullscreen-tool .ad-slot,
body.fl-fullscreen-tool .site-footer,
body.fl-fullscreen-tool .tool-footer { display: none !important; }
.fl-fullscreen-tool-shell {
  position: fixed;
  top: var(--header-h, 72px);
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  max-width: none !important;
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  padding: 14px;
}
.fl-fullscreen-tool-shell .code-editor {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
}
.fl-fullscreen-tool-shell .code-editor:not(:first-child) { margin-top: 14px; }
.fl-fullscreen-tool-shell .code-editor-body {
  flex: 1;
  max-height: none;
}
.fl-fullscreen-tool-shell .tool-actions {
  padding: 14px 0 4px;
  flex-shrink: 0;
}
@media (max-width: 991px) {
  .fl-fullscreen-tool-shell {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

/* ===== RESULT STAGE (full-screen + responsive) ===== */
.tool-card-shell.is-busy:not(.is-result) .tool-result-stage {
  min-height: min(58vh, 520px);
  justify-content: center;
}
.tool-card-shell.is-busy.is-result .tool-result-stage {
  min-height: auto;
  justify-content: flex-start;
  align-items: center;
  padding-top: clamp(14px, 3.5vh, 40px);
  padding-bottom: 40px;
  width: 100%;
}
.tool-result-stage {
  width: 100%;
  box-sizing: border-box;
}
.tool-card-shell.is-result .result-panel { width: 100%; }
.tool-card-shell.is-result .result-panel > .r-ico { margin-bottom: 22px; }
.tool-card-shell.is-result .result-meta { margin-bottom: 22px; }
.tool-card-shell.is-result .result-continue {
  margin-top: 30px;
  padding-top: 26px;
}
.tool-card-shell.is-result .trust-banner { margin-top: 26px; }
@media (min-width: 700px) {
  .tool-card-shell.is-result .tool-result-stage {
    max-width: 640px;
    margin-inline: auto;
  }
  .tool-card-shell.is-result .result-continue-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: none;
  }
  .tool-card-shell.is-result .result-continue-item {
    flex-direction: column;
    text-align: center;
    gap: 9px;
    padding: 16px 10px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
  }
  .tool-card-shell.is-result .result-continue-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
  }
  .tool-card-shell.is-result .result-continue-item .rci-arrow { display: none; }
}
@media (min-width: 960px) {
  .tool-card-shell.is-result .tool-result-stage { max-width: 780px; }
}
@media (max-width: 640px) {
  .tool-card-shell.is-result .tool-result-stage { padding-inline: 16px; }
  .tool-card-shell.is-result .result-meta { gap: 8px; }
  .tool-card-shell.is-result .result-meta .m {
    flex: 1 1 110px;
    min-width: 96px;
    padding: 12px 10px;
  }
  .tool-card-shell.is-result .trust-banner {
    padding: 16px 16px;
    border-radius: 14px;
  }
  .tool-card-shell.is-result .result-continue-item { padding: 12px 10px; }
}