/* =====================================================================
   TotoPDF – design system
   Brand: crimson #E03131 · ink #1B2341 · Plus Jakarta Sans
   ===================================================================== */
:root {
  --brand: #E03131;
  --brand-600: #C92A2A;
  --brand-700: #A61E1E;
  --brand-50: #FFF1F1;
  --brand-100: #FFE0E0;
  --ink: #1B2341;
  --ink-2: #3B4566;
  --muted: #6B7390;
  --line: #E6E8F0;
  --line-2: #F0F1F6;
  --bg: #F7F8FB;
  --card: #FFFFFF;
  --premium: #7048E8;
  --premium-2: #9C36B5;
  --success: #2B8A3E;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(27, 35, 65, .06), 0 1px 1px rgba(27, 35, 65, .04);
  --shadow: 0 8px 24px -8px rgba(27, 35, 65, .14), 0 2px 6px rgba(27, 35, 65, .05);
  --shadow-lg: 0 24px 48px -16px rgba(27, 35, 65, .22);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Bengali', Arial, sans-serif;
  --bs-primary: var(--brand);
  --bs-primary-rgb: 224, 49, 49;
  --bs-link-color: var(--brand-600);
  --bs-link-color-rgb: 201, 42, 42;
  --bs-link-hover-color: var(--brand-700);
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--ink-2);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--line);
  --bs-border-radius: 10px;
  --bs-focus-ring-color: rgba(224, 49, 49, .25);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink-2); font-size: 15.5px; line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--ink); font-weight: 750; letter-spacing: -.015em; }
a { text-underline-offset: 2px; }
::selection { background: var(--brand-100); }
:focus-visible { outline: 3px solid rgba(224, 49, 49, .45); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: 8px; z-index: 2000; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.bg-soft { background: var(--bg); }
.text-premium { color: var(--premium) !important; }
.bg-premium { background: linear-gradient(135deg, var(--premium), var(--premium-2)) !important; color: #fff !important; }
.link-button { background: none; border: 0; padding: 0; color: inherit; text-decoration: none; }
.link-button:hover { color: #fff; text-decoration: underline; }

/* ---------- buttons ---------- */
.btn { font-weight: 650; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700); --bs-btn-disabled-bg: #F08C8C; --bs-btn-disabled-border-color: #F08C8C;
  box-shadow: 0 6px 16px -6px rgba(224, 49, 49, .55); }
.btn-outline-primary { --bs-btn-color: var(--brand-600); --bs-btn-border-color: #F3B3B3; --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-600); }
.btn-premium { background: linear-gradient(135deg, var(--premium), var(--premium-2)); color: #fff; border: 0; box-shadow: 0 6px 16px -6px rgba(112, 72, 232, .6); }
.btn-premium:hover { color: #fff; filter: brightness(1.06); }
.btn-premium-outline { color: var(--premium); border: 2px solid #D0BFFF; background: #fff; }
.btn-premium-outline:hover { background: #F3F0FF; color: var(--premium); border-color: var(--premium); }
.btn-xl { padding: 1.05rem 2.4rem; font-size: 1.2rem; border-radius: 16px; }
.btn-icon { width: 42px; height: 42px; border-radius: 12px; color: var(--ink); background: transparent; border: 0; padding: 0; }
.btn-icon:hover { background: var(--line-2); }
.btn-light { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-light:hover { background: var(--line-2); border-color: var(--line); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -14px rgba(27, 35, 65, .35); }
.site-header .navbar { min-height: 68px; padding: .35rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand-word { font-weight: 800; font-size: 1.42rem; color: var(--ink); letter-spacing: -.035em; line-height: 1; }
.brand-word span { color: var(--brand); }
.brand-light .brand-word { color: #fff; }
.brand-light .brand-word span { color: #FF8787; }
.main-nav { margin-left: 1.75rem; gap: .15rem; }
.main-nav .nav-link { font-weight: 650; color: var(--ink); padding: .55rem .85rem !important; border-radius: 10px; font-size: .95rem; background: none; border: 0; }
.main-nav .nav-link:hover, .main-nav .nav-link.show { color: var(--brand); background: var(--brand-50); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.nav-login { color: var(--ink); font-weight: 650; text-decoration: none; }
.nav-login:hover { color: var(--brand); }
.avatar-btn { position: relative; padding: 0; border: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #F76707); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.badge-premium-dot { position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px; border-radius: 50%; background: var(--premium); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.account-menu { min-width: 250px; border-radius: 14px; border: 1px solid var(--line); padding-top: 0; overflow: hidden; }
.account-menu .dropdown-item { display: flex; gap: .6rem; align-items: center; padding: .5rem 1rem; font-weight: 550; }
.mega { border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 1.25rem; margin-top: .6rem !important; }
.mega-convert { display: none; min-width: 520px; }
.mega-convert.show { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mega-all { left: 0; right: 0; width: 100%; border-radius: 0 0 18px 18px; border-top: 0; margin-top: 0 !important; max-height: calc(100vh - 80px); overflow-y: auto; }
.mega-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem 1.25rem; padding: .5rem 0; }
.mega-title { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; text-decoration: none; }
a.mega-title:hover { color: var(--brand); }
.mega-link { display: flex; align-items: center; gap: .6rem; padding: .36rem .4rem; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.mega-link:hover { background: var(--line-2); color: var(--brand); }
.mobile-nav { width: min(92vw, 380px) !important; }
.mobile-tool-link { display: flex; align-items: center; gap: .6rem; padding: .55rem .25rem; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 8px; }
.mobile-tool-link:hover { color: var(--brand); }
.mobile-nav .accordion-button { font-weight: 700; color: var(--ink); padding: .8rem .25rem; }
.mobile-nav .accordion-button:not(.collapsed) { background: none; box-shadow: none; color: var(--brand); }

/* ---------- tool icon tiles ---------- */
.tool-ico { --c: var(--brand); width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); font-size: 1.35rem; }
.tool-ico.sm { width: 28px; height: 28px; border-radius: 8px; font-size: .95rem; }
.tool-ico.xl { width: 78px; height: 78px; border-radius: 22px; font-size: 2.3rem; margin-bottom: 1.25rem; background: color-mix(in srgb, var(--c) 14%, #fff); }
@supports not (background: color-mix(in srgb, red 10%, white)) { .tool-ico { background: #FFF1F1; } }

/* ---------- search ---------- */
.search-input { position: relative; }
.search-input > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input .form-control { padding-left: 2.5rem; border-radius: 12px; }
.search-modal { border-radius: 18px; border: 0; }
.search-results { display: grid; gap: .25rem; }
.search-hit { display: flex; gap: .75rem; align-items: center; padding: .6rem .7rem; border-radius: 12px; color: var(--ink); text-decoration: none; }
.search-hit:hover, .search-hit:focus { background: var(--line-2); color: var(--ink); }
.search-hit small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: .85rem; font-weight: 600; margin: 0 .3rem .3rem 0; text-decoration: none; }
.chip:hover { border-color: #F3B3B3; color: var(--brand); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 4.5rem 0 4rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background:
  radial-gradient(900px 420px at 85% 10%, rgba(224, 49, 49, .10), transparent 60%),
  radial-gradient(700px 380px at 10% 0%, rgba(112, 72, 232, .08), transparent 60%),
  linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .82rem; color: var(--ink); box-shadow: var(--shadow-sm); }
.eyebrow i { color: #F59F00; }
.hero-title { font-size: clamp(2.2rem, 5.2vw, 3.9rem); line-height: 1.06; font-weight: 800; letter-spacing: -.04em; margin: 1.1rem 0 1rem; }
.hero-title .hl { color: var(--brand); display: block; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40rem; }
.hero-search { position: relative; display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .4rem .4rem .4rem 2.75rem; box-shadow: var(--shadow); max-width: 36rem; margin: 1.75rem 0 1.25rem; }
.hero-search > i { position: absolute; left: 1rem; color: var(--muted); font-size: 1.1rem; }
.hero-search .form-control { border: 0; box-shadow: none; font-size: 1.05rem; padding: .55rem 0; background: transparent; }
.hero-search .btn { border-radius: 12px; padding: .6rem 1.2rem; }
.search-dropdown { position: absolute; top: calc(100% + .4rem); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .5rem; box-shadow: var(--shadow-lg); z-index: 20; max-height: 420px; overflow: auto; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-trust { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9rem; color: var(--muted); font-weight: 550; }
.hero-trust i { color: var(--success); margin-right: .3rem; }
.hero-visual { position: relative; height: 420px; }
.hv-doc { position: absolute; right: 30px; top: 30px; width: 270px; height: 350px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 28px 26px; transform: rotate(4deg); border: 1px solid var(--line); }
.hv-doc-top { height: 54px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #F76707); margin-bottom: 22px; }
.hv-line { height: 10px; border-radius: 6px; background: var(--line-2); margin-bottom: 14px; }
.w80 { width: 80%; } .w60 { width: 60%; } .w90 { width: 90%; } .w40 { width: 40%; }
.hv-sign { margin-top: 40px; font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 2.2rem; color: #364FC7; transform: rotate(-6deg); }
.hv-card { position: absolute; z-index: 2; display: flex; align-items: center; gap: .75rem; width: 270px; background: #fff; padding: .8rem 1rem; border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: floaty 6s ease-in-out infinite; }
.hv-card strong { display: block; color: var(--ink); font-size: .95rem; }
.hv-card small { color: var(--muted); }
.hv-1 { left: 0; top: 20px; }
.hv-2 { left: 30px; top: 170px; animation-delay: -2s; }
.hv-3 { left: 0; top: 320px; animation-delay: -4s; }
.hv-badge { margin-left: auto; background: #EBFBEE; color: var(--success); font-weight: 800; font-size: .8rem; padding: .2rem .5rem; border-radius: 8px; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hv-card { animation: none; } html { scroll-behavior: auto; } }

/* ---------- sections ---------- */
.section { padding: 3.5rem 0; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .4rem; }
.section-sub { color: var(--muted); font-size: 1.05rem; }
.section-h { font-size: 1.45rem; font-weight: 800; margin-bottom: 1rem; }
.cat-filter { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.75rem; }
.cat-pill { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: .5rem 1.05rem; border-radius: 999px; font-weight: 650; font-size: .92rem; transition: all .15s; }
.cat-pill:hover { border-color: #ADB5BD; }
.cat-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.tool-card { display: flex; flex-direction: column; gap: .9rem; padding: 1.35rem 1.3rem 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; min-height: 172px; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #DADDE8; color: inherit; }
.tool-card[hidden] { display: none; }
.tool-card-title { display: block; font-weight: 750; color: var(--ink); font-size: 1.07rem; margin-bottom: .3rem; letter-spacing: -.01em; }
.tool-card-text { display: block; color: var(--muted); font-size: .89rem; line-height: 1.45; }
.tool-card .badge { font-size: .66rem; vertical-align: middle; }

/* ---------- how / privacy / premium ---------- */
.how { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how-card { padding: 1.75rem; border-radius: var(--radius); background: var(--bg); height: 100%; }
.how-ico { width: 54px; height: 54px; border-radius: 15px; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.privacy-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 2.25rem; }
.privacy-ico { width: 58px; height: 58px; border-radius: 16px; background: #EBFBEE; color: var(--success); display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem; }
.premium-band { border-radius: 22px; padding: 2.25rem; color: #fff; background: radial-gradient(500px 260px at 100% 0%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(135deg, #5F3DC4, #9C36B5 70%, #C2255C); }
.premium-band h2, .premium-band .h3 { color: #fff; }
.premium-gem { width: 58px; height: 58px; border-radius: 16px; background: rgba(255, 255, 255, .18); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff; }
.premium-modal .premium-gem, .premium-card .premium-gem { background: linear-gradient(135deg, var(--premium), var(--premium-2)); }
.premium-gem.sm { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 12px; }
.check-list { list-style: none; padding: 0; margin: 1rem 0; }
.check-list li { position: relative; padding-left: 1.8rem; margin-bottom: .6rem; }
.check-list li::before { content: "\F26B"; font-family: bootstrap-icons; position: absolute; left: 0; top: 0; color: var(--success); font-size: 1.1rem; }
.check-list.light li::before { color: #B2F2BB; }
.premium-list { list-style: none; padding: 0; max-width: 340px; }
.premium-list li { margin: .45rem 0; } .premium-list i { color: var(--premium); margin-right: .4rem; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: 2.5rem; border-radius: 24px; color: #fff; background: radial-gradient(600px 300px at 0% 100%, rgba(255, 255, 255, .15), transparent 60%), linear-gradient(135deg, var(--brand), #E8590C); }
.cta-band h2 { color: #fff; }
.faq .accordion-item { border: 1px solid var(--line); border-radius: 14px !important; margin-bottom: .6rem; overflow: hidden; background: #fff; }
.faq .accordion-button { font-weight: 700; color: var(--ink); background: #fff; box-shadow: none; padding: 1.05rem 1.2rem; }
.faq .accordion-button:not(.collapsed) { color: var(--brand); background: #fff; }
.faq .accordion-body { color: var(--ink-2); padding-top: 0; }

/* ---------- blog cards ---------- */
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-thumb { display: block; aspect-ratio: 1200/630; background: var(--line-2); overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 2.5rem; color: #CED4DA; background: linear-gradient(135deg, #FFF5F5, #F3F0FF); }
.post-body { padding: 1.2rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.post-cat { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--brand); }
.post-title { font-size: 1.12rem; font-weight: 750; margin: .35rem 0 .5rem; line-height: 1.35; }
.post-title a { color: var(--ink); text-decoration: none; } .post-title a:hover { color: var(--brand); }
.post-excerpt { color: var(--muted); font-size: .92rem; flex: 1; }
.post-meta { font-size: .82rem; color: var(--muted); }

/* ---------- tool page ---------- */
.tool-hero { padding: 2.25rem 0 1.25rem; text-align: center; background: linear-gradient(180deg, #fff, var(--bg)); }
.crumbs { display: flex; justify-content: center; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .84rem; color: var(--muted); margin-bottom: .75rem; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--brand); }
.crumbs i { font-size: .65rem; }
.tool-h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: .6rem; }
.tool-lead { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.18rem); max-width: 46rem; margin: 0 auto; }
.tool-section { padding-bottom: 1.5rem; }
.tool-app { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); min-height: 340px; scroll-margin-top: 90px; }
.dropzone { padding: 3.25rem 1.5rem; text-align: center; border-radius: 24px; }
.drop-inner { max-width: 640px; margin: 0 auto; }
.drop-hint { color: var(--muted); margin: .9rem 0 0; font-weight: 550; }
.drop-limits { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.1rem; color: var(--muted); font-size: .84rem; margin: 1.1rem 0 0; }
.drop-limits i { margin-right: .25rem; }
.drag-overlay { position: absolute; inset: 0; border-radius: 24px; border: 3px dashed var(--brand); background: rgba(255, 241, 241, .94); display: none; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--brand); font-weight: 800; font-size: 1.2rem; z-index: 10; pointer-events: none; }
.drag-overlay i { font-size: 3rem; }
.tool-app.dragging .drag-overlay { display: flex; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 420px; }
.ws-main { padding: 1.5rem; background: var(--bg); border-radius: 24px 0 0 24px; min-width: 0; }
.ws-side { padding: 1.5rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.ws-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 1.1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.tool-options { flex: 1; display: grid; gap: 1rem; align-content: start; }
.tool-options .form-label { font-weight: 700; color: var(--ink); font-size: .9rem; margin-bottom: .35rem; display: flex; justify-content: space-between; }
.tool-options .form-control, .tool-options .form-select { border-radius: 10px; }
.opt[hidden] { display: none !important; }
.opt-out { font-weight: 700; color: var(--brand); }
.opt-radio { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .5rem; }
.btn-opt { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .7rem .5rem; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 650; font-size: .85rem; color: var(--ink); background: #fff; text-align: center; line-height: 1.25; }
.btn-opt i { font-size: 1.25rem; }
.btn-opt small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.btn-check:checked + .btn-opt { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand); }
.btn-check:focus-visible + .btn-opt { outline: 3px solid rgba(224, 49, 49, .35); }
.opt-info { font-size: .86rem; color: var(--muted); background: var(--bg); border-radius: 10px; padding: .75rem .85rem; }
.ws-action { margin-top: 1.25rem; position: sticky; bottom: 0; background: #fff; padding-top: .5rem; }
.process-hint { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; min-height: 1px; }
.btn-process { padding: .95rem 1rem; font-size: 1.08rem; border-radius: 14px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.file-grid[hidden] { display: none; }
.file-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .65rem; box-shadow: var(--shadow-sm); cursor: grab; user-select: none; }
.file-card:active { cursor: grabbing; }
.file-thumb { aspect-ratio: 3/4; border-radius: 9px; background: var(--line-2); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 2.2rem; color: #ADB5BD; }
.file-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.file-meta { padding: .5rem .15rem 0; }
.file-name { font-weight: 650; font-size: .84rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: .76rem; color: var(--muted); }
.file-remove { position: absolute; top: -9px; right: -9px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: .7rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); opacity: .9; }
.file-remove:hover { background: var(--brand); opacity: 1; }
.file-order { position: absolute; top: .9rem; left: .9rem; background: var(--brand); color: #fff; font-weight: 800; font-size: .72rem; width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.file-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; border: 2px dashed #D0D4E0; background: transparent; color: var(--muted); font-weight: 700; min-height: 220px; cursor: pointer; box-shadow: none; }
.file-add i { font-size: 1.8rem; color: var(--brand); }
.file-add:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.sort-ghost { opacity: .35; }
.tool-workspace:empty { display: none; }
.tool-workspace { margin-top: 1rem; }
.file-grid[hidden] + .tool-workspace { margin-top: 0; }
.progress-panel { padding: 4rem 1.5rem; text-align: center; }
.progress-panel .progress { height: 10px; max-width: 420px; border-radius: 999px; background: var(--line-2); }
.progress-panel .progress-bar { background: var(--brand); border-radius: 999px; transition: width .25s ease; }
.spinner-ring { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; border: 6px solid var(--brand-100); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-panel { padding: 2rem; }
.result-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.result-check { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; background: #EBFBEE; color: var(--success); display: flex; align-items: center; justify-content: center; font-size: 1.9rem; }
.result-files { display: grid; gap: .65rem; }
.result-file { display: flex; align-items: center; gap: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.result-thumb { width: 52px; height: 64px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 1.5rem; color: var(--brand); flex: 0 0 auto; }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-meta { flex: 1; min-width: 0; }
.btn-download { min-width: 140px; }
.result-text { margin-top: 1.25rem; }
.result-text textarea { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .88rem; background: var(--bg); }
.result-report { margin-top: 1.25rem; }
.result-report table { width: 100%; }
.result-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.continue-with { margin-top: 1.25rem; }
.chip-tool i { color: var(--brand); }
.tool-content { padding: 3rem 0 2rem; }
.howto { counter-reset: s; list-style: none; padding: 0; display: grid; gap: .75rem; }
.howto li { counter-increment: s; position: relative; padding: 1rem 1rem 1rem 3.6rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.howto li::before { content: counter(s); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; height: 100%; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.premium-card { background: linear-gradient(160deg, #F3F0FF, #fff 70%); border-color: #E5DBFF; }
.related-list { display: grid; gap: .25rem; }
.related-item { display: flex; gap: .7rem; align-items: center; padding: .5rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.related-item:hover { background: var(--line-2); color: var(--ink); }
.related-item small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.related-item strong { font-size: .9rem; }

/* page grid (organize tools) + editor share these */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .9rem; }
.page-tile { position: relative; background: #fff; border: 2px solid transparent; border-radius: 12px; padding: .45rem; box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .12s; }
.page-tile.selected { border-color: var(--brand); background: var(--brand-50); }
.page-tile.removed { opacity: .35; }
.page-tile canvas, .page-tile img { width: 100%; height: auto; display: block; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.page-no { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); margin-top: .35rem; }
.page-tools { position: absolute; top: .3rem; right: .3rem; display: flex; gap: .25rem; opacity: 0; transition: opacity .12s; }
.page-tile:hover .page-tools, .page-tile:focus-within .page-tools { opacity: 1; }
.page-tools button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: rgba(27, 35, 65, .85); color: #fff; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.page-tools button:hover { background: var(--brand); }
.page-check { position: absolute; top: .55rem; left: .55rem; width: 22px; height: 22px; border-radius: 6px; background: #fff; border: 2px solid #CED4DA; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem; }
.page-tile.selected .page-check { background: var(--brand); border-color: var(--brand); }
.ws-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }

/* report tables */
.kv-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kv-table th, .kv-table td { padding: .6rem .85rem; border-bottom: 1px solid var(--line-2); vertical-align: top; word-break: break-word; }
.kv-table th { width: 34%; color: var(--muted); font-weight: 650; background: var(--bg); }
.kv-table tr:last-child th, .kv-table tr:last-child td { border-bottom: 0; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat-tile { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.stat-tile .v { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-tile .l { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ---------- notices ---------- */
.notice { --nc: #1971C2; --nb: #E7F5FF; background: var(--nb); color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--nc) 25%, transparent); }
.notice-success { --nc: #2B8A3E; --nb: #EBFBEE; }
.notice-warning { --nc: #E67700; --nb: #FFF4E6; }
.notice-maintenance { --nc: #C92A2A; --nb: #FFF5F5; }
.notice-promotion { --nc: #7048E8; --nb: #F3F0FF; }
.notice-inner { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; font-size: .92rem; }
.notices-inline { max-width: 1320px; margin: 1rem auto 0; padding: 0 12px; }
.notices-inline .notice { border-radius: 14px; border: 1px solid color-mix(in srgb, var(--nc) 25%, transparent); margin-bottom: .5rem; }
.notices-inline .notice-inner { padding: .7rem 1rem; }
.notice-icon { color: var(--nc); font-size: 1.15rem; }
.notice-text { flex: 1; } .notice-text strong { margin-right: .35rem; }
.notice-link { font-weight: 700; color: var(--nc); margin-left: .35rem; }
.notice-close { border: 0; background: none; color: var(--muted); padding: .25rem .5rem; border-radius: 8px; }
.notice-close:hover { background: rgba(0, 0, 0, .06); }

/* ---------- ads ---------- */
.ad-slot { max-width: 1320px; margin: 1.25rem auto; padding: 0 12px; text-align: center; min-height: 0; }
.ad-slot img { max-width: 100%; height: auto; border-radius: 12px; }
.ad-label { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #ADB5BD; margin-bottom: .25rem; }
.ad-sidebar { margin: 0 0 1rem; padding: 0; }
@media (max-width: 767.98px) { .ad-only-desktop { display: none; } }
@media (min-width: 768px) { .ad-only-mobile { display: none; } }

/* ---------- footer ---------- */
.site-footer { background: #121833; color: #AEB6D1; padding: 3.5rem 0 1.5rem; margin-top: 3rem; }
.footer-lead { max-width: 340px; font-size: .92rem; }
.footer-title { color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .92rem; }
.footer-links a { color: #AEB6D1; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.trust-chip { display: inline-flex; gap: .35rem; align-items: center; font-size: .78rem; font-weight: 650; padding: .3rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #D0D6EA; }
.footer-social { display: flex; gap: .5rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .08); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .86rem; }
.lang-switch { display: flex; align-items: center; gap: .5rem; }
.lang-switch .form-select { background-color: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: #fff; width: auto; }
.lang-switch option { color: #000; }

/* ---------- consent ---------- */
.consent-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1080; max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 1.1rem 1.25rem; }
.consent-inner { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.consent-text { flex: 1 1 380px; font-size: .9rem; }
.consent-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- toasts / modals ---------- */
.toast-container { z-index: 1090; }
.toto-toast { border: 0; border-radius: 14px; box-shadow: var(--shadow-lg); min-width: 280px; }
.toast-ico { font-size: 1.15rem; }
.toast-success .toast-ico { color: var(--success); } .toast-error .toast-ico { color: var(--brand); }
.toast-warning .toast-ico { color: #E67700; } .toast-info .toast-ico { color: #1971C2; }
.toast-error { border-left: 4px solid var(--brand); }
.confirm-icon { display: inline-flex; width: 54px; height: 54px; border-radius: 16px; background: var(--brand-50); color: var(--brand); align-items: center; justify-content: center; font-size: 1.6rem; }
.modal-content { border-radius: 20px; border: 0; }

/* ---------- forms / auth / account ---------- */
.auth-wrap { max-width: 460px; margin: 3rem auto; padding: 0 1rem; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 2.25rem; box-shadow: var(--shadow); }
.auth-card .form-control { padding: .7rem .9rem; border-radius: 12px; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin: 1.25rem 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-oauth { border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%; padding: .65rem; }
.btn-oauth:hover { background: var(--bg); }
.page-wrap { padding: 2.5rem 0 3rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.account-nav .nav-link { color: var(--ink-2); font-weight: 600; border-radius: 10px; padding: .55rem .85rem; display: flex; gap: .55rem; align-items: center; }
.account-nav .nav-link.active, .account-nav .nav-link:hover { background: var(--brand-50); color: var(--brand); }
.usage-bar { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.usage-bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.pw-meter { height: 5px; border-radius: 999px; background: var(--line-2); margin-top: .4rem; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

/* ---------- pricing ---------- */
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 2rem; height: 100%; display: flex; flex-direction: column; position: relative; }
.plan-card.featured { border: 2px solid var(--premium); box-shadow: 0 24px 50px -24px rgba(112, 72, 232, .5); }
.plan-ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--premium), var(--premium-2)); color: #fff; font-size: .75rem; font-weight: 800; padding: .3rem .85rem; border-radius: 999px; letter-spacing: .04em; }
.plan-price { font-size: 2.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.plan-price small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.billing-toggle { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .25rem; }
.billing-toggle button { border: 0; background: none; padding: .5rem 1.1rem; border-radius: 999px; font-weight: 700; color: var(--ink-2); }
.billing-toggle button.active { background: var(--ink); color: #fff; }

/* ---------- prose (blog / legal) ---------- */
.prose { font-size: 1.04rem; line-height: 1.8; color: var(--ink-2); }
.prose h2 { font-size: 1.6rem; margin: 2.25rem 0 .9rem; }
.prose h3 { font-size: 1.25rem; margin: 1.75rem 0 .7rem; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; }
.prose blockquote { border-left: 4px solid var(--brand); padding: .25rem 0 .25rem 1rem; color: var(--muted); }
.prose pre { background: #121833; color: #E9ECEF; padding: 1rem; border-radius: 12px; overflow: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .7rem; }
.prose th { background: var(--bg); }
.legal-wrap { max-width: 860px; margin: 0 auto; }
.toc { position: sticky; top: 90px; }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) { .mega-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
  .workspace { grid-template-columns: 1fr; }
  .ws-main { border-radius: 24px 24px 0 0; padding: 1rem; }
  .ws-side { border-left: 0; border-top: 1px solid var(--line); }
  .ws-action { position: sticky; bottom: 0; margin: 1rem -1.5rem -1.5rem; padding: .85rem 1.5rem calc(.85rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -18px rgba(27, 35, 65, .35); border-radius: 0 0 24px 24px; z-index: 5; }
  .hero { padding: 2.75rem 0 2.5rem; }
}
@media (max-width: 575.98px) {
  body { font-size: 15px; }
  .tool-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .tool-card { padding: 1rem; min-height: 0; gap: .6rem; }
  .tool-card-text { font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .tool-card-title { font-size: .97rem; }
  .tool-ico { width: 40px; height: 40px; font-size: 1.15rem; }
  .file-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .dropzone { padding: 2.25rem 1rem; }
  .btn-xl { width: 100%; padding: 1rem 1.25rem; font-size: 1.08rem; }
  .result-panel { padding: 1.25rem; }
  .result-file { flex-wrap: wrap; }
  .btn-download { width: 100%; }
  .hero-search { padding-left: 2.5rem; }
  .hero-search .btn { display: none; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .section { padding: 2.5rem 0; }
  .cta-band, .premium-band, .privacy-card { padding: 1.5rem; }
  .cat-filter { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; margin-left: -12px; margin-right: -12px; padding-left: 12px; scrollbar-width: none; }
  .cat-filter::-webkit-scrollbar { display: none; }
  .cat-pill { white-space: nowrap; }
  .page-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .page-tools { opacity: 1; }
  .auth-card { padding: 1.5rem; }
}
[dir="rtl"] .search-input > i, [dir="rtl"] .hero-search > i { left: auto; right: 1rem; }
[dir="rtl"] .search-input .form-control { padding-left: .75rem; padding-right: 2.5rem; }
[dir="rtl"] .howto li { padding: 1rem 3.6rem 1rem 1rem; }
[dir="rtl"] .howto li::before { left: auto; right: 1rem; }
@media print { .site-header, .site-footer, .ad-slot, .consent-banner, .notices { display: none !important; } }
.error-code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1; letter-spacing: -.05em; background: linear-gradient(135deg, var(--brand), #F76707); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-icon { width: 72px; height: 72px; border-radius: 20px; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1rem; }
.file-bar { display: flex; align-items: center; gap: .65rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .75rem; margin-bottom: 1rem; min-width: 0; }
.file-bar > i { color: var(--brand); font-size: 1.2rem; }
.file-bar .file-name { min-width: 0; flex: 0 1 auto; }
.file-bar .file-size { white-space: nowrap; }
.drop-inner .tool-ico.xl { display: flex; margin: 0 auto 1.25rem; }
