/* ===================================================================
   ILoveImagePDF — global stylesheet
   Loaded on every page via includes/header.php
   Sections: tokens, base, header/nav, mobile drawer, hero, search,
   sections generic, tool grid, steps, why, cta, faq, footer, tool-ui
   =================================================================== */

:root{
  --bg:#F7F7FB;
  --card:#FFFFFF;
  --ink:#161A2B;
  --ink-soft:#5B6072;
  --line:#E7E7F0;
  --indigo:#4F46E5;
  --indigo-deep:#3E35C7;
  --indigo-tint:#EEEDFD;
  --pdf:#F0353F;
  --pdf-tint:#FDEAEB;
  --img:#2AA7E0;
  --img-tint:#E9F6FC;
  --calc:#19A968;
  --calc-tint:#E7F8EF;
  --font-display:'Plus Jakarta Sans',system-ui,sans-serif;
  --font-body:'Inter',system-ui,sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0;}
[hidden]{display:none !important;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none;}
.wrap{max-width:1180px;margin:0 auto;padding:0 24px;}
h1,h2,h3{
  font-family:var(--font-display);
  letter-spacing:-0.01em;
  color:var(--ink);
}

/* ---------- Global interactive / mobile tap behavior ---------- */
a,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
summary{
  -webkit-tap-highlight-color:transparent;
}

button{font-family:inherit;cursor:pointer;}

:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:3px;
}

/* ---------- Header ---------- */
header.site{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(255,255,255,0.96);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(22,26,43,0.03);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 24px;
  gap:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:9px;
}

.logo-img{
  height:42px;
  width:auto;
  display:block;
}

@media(max-width:560px){
  .logo-img{height:40px;}
  .logo-img-sm{height:32px;}
}

.logo-img-light{
  background:#fff;
  border-radius:8px;
  padding:6px 10px;
  height:32px;
}

nav.links{
  display:flex;
  gap:26px;
  font-size:0.93rem;
  font-weight:600;
}

nav.links a{
  color:var(--ink-soft);
  transition:color .15s ease;
}

nav.links a:hover{
  color:var(--indigo-deep);
}

nav.links a:focus{
  outline:none;
}

nav.links a:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:4px;
  border-radius:3px;
}

nav.links a:active{
  color:var(--indigo-deep);
}

/* ---------- Hamburger ---------- */
.hamburger{
  display:none;
  width:40px;
  height:40px;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--card);
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    border-color .15s ease,
    background .15s ease,
    transform .15s ease;
}

.hamburger:hover{
  border-color:var(--indigo);
  background:var(--indigo-tint);
}

.hamburger:focus{
  outline:none;
}

.hamburger:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.hamburger:active{
  transform:scale(0.97);
  background:var(--indigo-tint);
}

.hamburger .bar{
  display:block;
  width:18px;
  height:1.6px;
  background:var(--ink);
  border-radius:2px;
  transition:
    transform .25s ease,
    opacity .2s ease,
    width .2s ease;
}

.hamburger[aria-expanded="true"] .bar-top{
  transform:translateY(5.6px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .bar-mid{
  opacity:0;
}

.hamburger[aria-expanded="true"] .bar-bottom{
  transform:translateY(-5.6px) rotate(-45deg);
}

@media(max-width:880px){
  nav.links{display:none;}
  /*.hamburger{display:flex;}*/
}

/*--Show hamburger menu on desktop and mobile--*/
.hamburger {
    display: flex;
    flex-shrink: 0;
    /*margin-left: auto;*/
}

@media(max-width:560px){
  .brand{font-size:1.15rem;}
}

/* ---------- Mobile menu (dropdown panel, anchored under the hamburger) ---------- */
.drawer-overlay{
  position:fixed;
  inset:0;
  background:rgba(20,23,42,0.45);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:49;
}

.drawer-overlay.open{
  opacity:1;
  pointer-events:auto;
}

.menu-panel{
  position:fixed;
  top:66px;
  /*left:16px;*/
  right:14px;
  max-width:320px;
  margin-left:auto; /* right-aligns toward the hamburger on wider phones/tablets */
  max-height:min(74vh,600px);
  background:var(--card);
  border-radius:18px;
  box-shadow:0 24px 60px -20px rgba(20,23,42,0.35);
  z-index:50;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  transform-origin:top right;
  transform:scale(0.94);
  opacity:0;
  pointer-events:none;
  transition:transform .2s ease, opacity .2s ease;
}

.menu-panel.open{
  transform:scale(1);
  opacity:1;
  pointer-events:auto;
}

.menu-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  font-weight:700;
  font-size:1rem;
  flex:none;
}

.menu-panel-close{
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:8px;
  border:1px solid var(--line);
  background:var(--bg);
  color:var(--ink-soft);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:border-color .15s ease, color .15s ease, transform .15s ease;
}

.menu-panel-close:hover{
  border-color:var(--indigo);
  color:var(--indigo-deep);
}

.menu-panel-close:focus{
  outline:none;
}

.menu-panel-close:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.menu-panel-close:active{
  transform:scale(0.92);
}

.menu-panel-list{
  flex:1 1 auto;
  overflow-y:auto;
  padding:8px;
  display:grid;
  grid-template-columns:1fr;
  gap:2px;
}

@media(min-width:480px){
  .menu-panel-list{grid-template-columns:repeat(2,1fr);}
}

.menu-panel-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 10px;
  border-radius:10px;
  font-weight:600;
  font-size:0.92rem;
  color:var(--ink);
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:background .15s ease, color .15s ease, transform .15s ease;
}

.menu-panel-icon{
  flex:none;
  width:32px;
  height:32px;
}

.menu-panel-icon svg{
  display:block;
  width:100%;
  height:100%;
}

.menu-panel-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.menu-panel-item:hover{
  background:var(--bg);
  color:var(--indigo-deep);
}

.menu-panel-item:focus{
  outline:none;
}

.menu-panel-item:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.menu-panel-item:active{
  background:var(--indigo-tint);
  color:var(--indigo-deep);
  transform:scale(0.98);
}

.menu-panel-foot{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:12px;
  border-top:1px solid var(--line);
  flex:none;
}

.menu-panel-quicklink{
  flex:1 1 auto;
  text-align:center;
  background:var(--bg);
  border-radius:10px;
  padding:10px 12px;
  font-weight:700;
  font-size:0.84rem;
  color:var(--indigo-deep);
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:background .15s ease, transform .15s ease;
}

.menu-panel-quicklink:hover{
  background:var(--indigo-tint);
}

.menu-panel-quicklink:focus{
  outline:none;
}

.menu-panel-quicklink:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.menu-panel-quicklink:active{
  transform:scale(0.97);
}

body.drawer-open{
  overflow:hidden;
}

/* ---------- Hero ---------- */
.hero{
  padding:32px 0 40px;
  text-align:center;
}

.hero h1{
  font-size:2.5rem;
  line-height:1.25;
  font-weight:900;
  margin:0 auto 16px;
  max-width:70ch;
}

.hero h1 .accent{
  color:var(--indigo);
}

.hero p.lead{
  color:var(--ink-soft);
  font-size:1.08rem;
  max-width:60ch;
  margin:0 auto 34px;
}

@media(max-width:560px){
  .hero{padding:20px 0 24px;}
  .hero h1{
    font-size:2.3rem;
    max-width:20ch;
  }
}

/* ---------- Search ---------- */
.searchbar{
  max-width:650px;
  margin:0 auto 22px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:8px;
  display:flex;
  gap:8px;
  box-shadow:0 12px 30px -14px rgba(79,70,229,0.25);
}

.searchbar input{
  flex:1;
  min-width:0;
  border:0;
  background:transparent;
  padding:12px 10px;
  font-size:0.98rem;
  font-family:inherit;
  color:var(--ink);
}

.searchbar input:focus{
  outline:none;
}

.searchbar button{
  flex:none;
  background:var(--indigo);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:0 22px;
  font-weight:700;
  font-size:0.95rem;
  white-space:nowrap;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    background .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

.searchbar button:hover{
  background:var(--indigo-deep);
  box-shadow:0 5px 14px -7px rgba(62,53,199,0.55);
}

.searchbar button:focus{
  outline:none;
}

.searchbar button:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:3px;
}

.searchbar button:active{
  background:var(--indigo-deep);
  transform:scale(0.97);
  box-shadow:none;
}

.search-icon{
  flex:none;
  display:flex;
  align-items:center;
  padding-left:10px;
  color:var(--ink-soft);
}

#search-empty{
  display:none;
  color:var(--ink-soft);
  font-size:0.9rem;
  margin-top:-8px;
  margin-bottom:20px;
}

@media(max-width:420px){
  .searchbar{
    flex-wrap:wrap;
    padding:10px;
  }

  .search-icon{
    order:1;
    padding-left:4px;
  }

  .searchbar input{
    order:2;
    flex:1 1 auto;
    padding:10px 6px;
  }

  .searchbar button{
    order:3;
    flex:1 1 100%;
    padding:12px;
    margin-top:4px;
  }
}

.popular{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  max-width:640px;
  margin:0 auto;
}

.popular span.label{
  font-size:0.86rem;
  color:var(--ink-soft);
  font-weight:600;
}

/* ---------- Popular pills ---------- */
.pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 15px;
  font-size:0.87rem;
  font-weight:600;
  color:var(--ink);
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease,
    transform .15s ease;
}

.pill:hover{
  border-color:var(--indigo);
  color:var(--indigo-deep);
  background:var(--indigo-tint);
}

.pill:focus{
  outline:none;
}

.pill:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.pill:active{
  transform:scale(0.98);
  background:var(--indigo-tint);
}

.pill .dot{
  width:7px;
  height:7px;
  border-radius:50%;
  flex:none;
}

.dot-pdf{background:var(--pdf);}
.dot-img{background:var(--img);}
.dot-calc{background:var(--calc);}

/* ---------- Sections generic ---------- */
section{
  padding:56px 0;
}

.section-head{
  text-align:center;
  max-width:56ch;
  margin:0 auto 34px;
}

.section-head h2{
  font-size:clamp(1.5rem,2.6vw,2rem);
  margin-bottom:10px;
}

.section-head p{
  color:var(--ink-soft);
  font-size:1rem;
}

/* ---------- Tool grid + tabs ---------- */
.tabs{
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:8px;
}

.tab-btn{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 18px;
  font-size:0.88rem;
  font-weight:700;
  color:var(--ink-soft);
  display:flex;
  align-items:center;
  gap:8px;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease,
    transform .15s ease;
}

.tab-btn:hover{
  border-color:var(--indigo);
  color:var(--indigo-deep);
}

.tab-btn:focus{
  outline:none;
}

.tab-btn:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.tab-btn:active{
  transform:scale(0.98);
}

.tab-btn .dot{
  width:7px;
  height:7px;
  border-radius:50%;
}

.tab-btn.active{
  background:var(--indigo);
  color:#fff;
  border-color:var(--indigo);
}

.tab-btn.active .dot{
  background:#fff;
}

.tool-count{
  text-align:center;
  color:var(--ink-soft);
  font-size:0.85rem;
  margin:14px 0 26px;
}

.tool-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

@media(max-width:880px){
  .tool-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:560px){
  .tool-grid{
    grid-template-columns:1fr;
  }
}

/* ---------- Tool cards ---------- */
.tool-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px 20px;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
  -webkit-tap-highlight-color:transparent;
  outline:none;
}

.tool-card:hover,
.tool-card:focus-visible{
  border-color:#F0353F;
  box-shadow:0 8px 24px -16px rgba(240,53,63,0.45);
  transform:translateY(-2px);
}

.tool-card:active{
  border-color:#D92D36;
  box-shadow:0 4px 14px -10px rgba(240,53,63,0.55);
  transform:translateY(0);
}

.tool-card-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.tool-icon{
  width:36px;
  height:36px;
  flex:none;
}

.tool-icon svg{
  display:block;
  width:100%;
  height:100%;
}

.tool-card h3{
  font-size:1rem;
  margin:0;
}

.tool-card p{
  font-size:0.87rem;
  color:var(--ink-soft);
}

.tool-card.hidden{
  display:none;
}

/* ---------- How it works ---------- */
.steps{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
}

@media(max-width:880px){
  .steps{
    grid-template-columns:1fr;
  }
}

.step{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:24px;
}

.step-illustration{
  position:relative;
  margin:-24px -24px 18px;
  overflow:visible;
}

.step-illustration svg{
  display:block;
  width:100%;
  height:auto;
  border-radius:16px 16px 0 0;
}

.step-badge{
  position:absolute;
  top:-14px;
  left:16px;
  width:32px;
  height:32px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--font-display);
  font-weight:800;
  font-size:0.95rem;
  color:#fff;
  box-shadow:0 8px 16px -6px rgba(22,26,43,0.35);
  z-index:2;
}

.step-badge-1{background:var(--indigo);}
.step-badge-2{background:var(--indigo);}
.step-badge-3{background:var(--calc);}

.step h3{
  font-size:1.02rem;
  margin-bottom:8px;
}

.step p{
  color:var(--ink-soft);
  font-size:0.92rem;
}

/* ---------- Why grid ---------- */
.why-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}

@media(max-width:960px){
  .why-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:560px){
  .why-grid{
    grid-template-columns:1fr;
  }
}

.why-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:22px;
  text-align:center;
}

.why-icon{
  width:46px;
  height:46px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 14px;
}

.why-icon-indigo{background:var(--indigo-tint);}
.why-icon-orange{background:#FDEEE9;}
.why-icon-green{background:var(--calc-tint);}
.why-icon-blue{background:var(--img-tint);}

.why-card h3{
  font-size:0.98rem;
  margin-bottom:8px;
}

.why-card p{
  color:var(--ink-soft);
  font-size:0.87rem;
}

/* ---------- CTA band ---------- */
.cta-band{
  background:linear-gradient(135deg,var(--indigo),var(--indigo-deep));
  border-radius:22px;
  padding:46px 30px;
  text-align:center;
  color:#fff;
}

.cta-band h2{
  color:#fff;
  font-size:clamp(1.4rem,2.6vw,1.9rem);
  margin-bottom:10px;
}

.cta-band p{
  color:#DEDBFA;
  margin-bottom:24px;
  max-width:44ch;
  margin-left:auto;
  margin-right:auto;
}

.cta-band .btn{
  display:inline-block;
  background:#fff;
  color:var(--indigo-deep);
  padding:13px 26px;
  border-radius:10px;
  font-weight:700;
  font-size:0.95rem;
  border:1px solid transparent;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

.cta-band .btn:hover{
  background:var(--indigo-tint);
  color:var(--indigo-deep);
  box-shadow:0 8px 20px -12px rgba(22,26,43,0.5);
}

.cta-band .btn:focus{
  outline:none;
}

.cta-band .btn:focus-visible{
  outline:2px solid #fff;
  outline-offset:3px;
}

.cta-band .btn:active{
  transform:scale(0.97);
  box-shadow:none;
}

/* ---------- FAQ ----------
   JS-driven accordion (assets/js/faq.js), not native <details>, so the
   open/close can actually animate smoothly via a grid-rows transition —
   <details> has no transitionable "open" state in CSS. */
.faq-list{
  max-width:760px;
  margin:0 auto;
}

.faq-item{
  border-bottom:1px solid var(--line);
}

.faq-question{
  width:100%;
  text-align:left;
  background:none;
  border:0;
  padding:18px 0;
  cursor:pointer;
  font-weight:700;
  font-size:0.98rem;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  color:var(--ink);
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    color .15s ease,
    transform .15s ease;
}

.faq-question:hover{
  color:var(--indigo-deep);
}

.faq-question:focus{
  outline:none;
}

.faq-question:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:3px;
  border-radius:4px;
}

.faq-question:active{
  transform:scale(0.99);
}

.faq-icon{
  flex:none;
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--indigo);
  font-weight:800;
  font-size:1.15rem;
  transition:transform .25s ease;
}

.faq-item.open .faq-icon{
  transform:rotate(135deg);
}

.faq-answer{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .25s ease;
}

.faq-answer > div{
  overflow:hidden;
  min-height:0;
}

.faq-answer p{
  color:var(--ink-soft);
  font-size:0.93rem;
  padding-bottom:0;
  transition:padding .25s ease;
}

.faq-item.open .faq-answer{
  grid-template-rows:1fr;
}

.faq-item.open .faq-answer p{
  padding-bottom:18px;
}

/* ---------- Footer ---------- */
footer{
  background:#14172A;
  color:#AEB1C6;
  padding:50px 0 26px;
  margin-top:20px;
}

.foot-grid{
  display:grid;
  grid-template-columns:1.3fr repeat(4,1fr);
  gap:26px;
  margin-bottom:36px;
}

@media(max-width:880px){
  .foot-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

footer h4{
  font-size:0.78rem;
  letter-spacing:0.05em;
  text-transform:uppercase;
  color:#7B7FA0;
  margin-bottom:14px;
}

footer ul{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:9px;
  font-size:0.88rem;
}

footer a{
  outline:none;
  transition:
    color .15s ease,
    transform .15s ease;
}

footer a:hover{
  color:#fff;
}

footer a:focus{
  outline:none;
}

footer a:focus-visible{
  outline:2px solid #fff;
  outline-offset:3px;
  border-radius:3px;
}

footer a:active{
  color:#fff;
}

.foot-brand p{
  color:#7B7FA0;
  font-size:0.86rem;
  max-width:30ch;
  margin-top:10px;
}

.foot-bottom{
  border-top:1px solid rgba(255,255,255,0.08);
  padding-top:20px;
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  font-size:0.8rem;
  color:#7B7FA0;
}

/* ===================================================================
   Reusable tool-page UI components (dropzone, progress bar, sliders,
   file cards). Shared by compress-image and future tool pages.
   =================================================================== */

.tool-hero{
  padding:36px 0 8px;
  text-align:center;
}

.tool-hero h1{
  font-size:clamp(1.9rem,4.2vw,2.6rem);
  line-height:1.15;
  margin-bottom:14px;
}

.tool-hero h1 .accent{
  color:var(--indigo);
}

.tool-hero p.lead{
  color:var(--ink-soft);
  font-size:1.02rem;
  max-width:56ch;
  margin:0 auto;
}

.tool-workspace{
  padding:32px 0 64px;
}

/* ---------- Dropzone ---------- */
.dropzone{
  border:2px dashed var(--line);
  border-radius:18px;
  background:var(--card);
  padding:44px 24px;
  text-align:center;
  cursor:pointer;
  transition:
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
  max-width:640px;
  margin:0 auto;
  -webkit-tap-highlight-color:transparent;
  outline:none;
}

.dropzone:hover,
.dropzone.dragover{
  border-color:var(--indigo);
  background:var(--indigo-tint);
}

.dropzone:focus-within{
  border-color:var(--indigo);
  box-shadow:0 0 0 3px rgba(79,70,229,0.12);
}

.dropzone.has-files{
  padding:18px 24px;
  cursor:default;
}

.dropzone.has-files .dropzone-inner{
  display:none;
}

.dropzone-inner svg{
  margin:0 auto 14px;
  display:block;
}

.dropzone-inner strong{
  display:block;
  font-family:var(--font-display);
  font-size:1.05rem;
  margin-bottom:6px;
}

.dropzone-inner span{
  color:var(--ink-soft);
  font-size:0.9rem;
}

/* ---------- Add more button ---------- */
.btn-add-more{
  display:none;
  margin:0 auto;
  align-items:center;
  gap:8px;
  background:var(--indigo-tint);
  color:var(--indigo-deep);
  border:1px solid transparent;
  border-radius:999px;
  padding:10px 18px;
  font-weight:700;
  font-size:0.88rem;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease,
    transform .15s ease;
}

.dropzone.has-files .btn-add-more{
  display:inline-flex;
}

.btn-add-more:hover{
  border-color:var(--indigo);
  background:#E7E5FC;
}

.btn-add-more:focus{
  outline:none;
}

.btn-add-more:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.btn-add-more:active{
  transform:scale(0.97);
}

/* ---------- Two-column workspace: images left (wider), options right ---------- */
.tool-columns{
  display:flex;
  flex-direction:column;
  gap:24px;
  margin-top:24px;
}

.tool-col-images{
  order:2;
}

.tool-col-side{
  order:1;
  display:flex;
  flex-direction:column;
  gap:20px;
  width:100%;
}

.tool-col-options{
  display:flex;
  flex-direction:column;
  gap:16px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:20px;
  width:100%;
}

@media(min-width:960px){
  .tool-columns{
    flex-direction:row;
    align-items:flex-start;
    max-width:1200px;
    margin-left:auto;
    margin-right:auto;
  }

  .tool-col-images{
    order:1;
    flex:1 1 auto;
    min-width:0;
    min-height:420px;
    max-height:680px;
    overflow-y:auto;
    padding:4px;
  }

  .tool-col-side{
    order:2;
    flex:0 0 320px;
    width:320px;
  }

  .tool-col-options{
    max-height:680px;
    overflow-y:auto;
    position:sticky;
    top:90px;
  }
}

/* ---------- SEO note under the options panel ---------- */
.col-seo-note{
  background:var(--indigo-tint);
  border:1px solid #DCD9FB;
  border-radius:14px;
  padding:18px 20px;
  text-align:center;
}

.col-seo-note strong{
  display:block;
  font-family:var(--font-display);
  font-size:0.98rem;
  color:var(--indigo-deep);
  margin-bottom:8px;
  line-height:1.35;
}

.col-seo-note p{
  font-size:0.86rem;
  color:var(--ink-soft);
  line-height:1.55;
}

.batch-control{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  width:100%;
  text-align:center;
}

.batch-control label{
  font-size:0.86rem;
  font-weight:600;
  color:var(--ink-soft);
}

.batch-control strong{
  color:var(--indigo);
}

/* ---------- Sliders ---------- */
.slider{
  width:100%;
  accent-color:var(--indigo);
  height:6px;
  cursor:pointer;
}

.mini-slider{
  accent-color:var(--indigo);
  width:100%;
  margin:8px 0;
}

/* ---------- Compress-all/Resize-all paired with Clear-all ---------- */
.action-row{
  display:flex;
  gap:8px;
  width:100%;
  flex-wrap:nowrap;
}

.action-row .btn{
  flex:1;
  white-space:nowrap;
  padding-left:10px;
  padding-right:10px;
  font-size:0.86rem;
}

/* ---------- General buttons ---------- */
.btn{
  border-radius:10px;
  font-weight:700;
  font-size:0.94rem;
  padding:12px 20px;
  border:1px solid transparent;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    border-color .15s ease,
    background .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

.btn:focus{
  outline:none;
}

.btn:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.btn:active{
  transform:scale(0.97);
}

.btn-primary{
  background:var(--indigo);
  color:#fff;
  border-color:var(--indigo);
}

.btn-primary:hover{
  background:var(--indigo-deep);
  border-color:var(--indigo-deep);
  box-shadow:0 6px 16px -9px rgba(62,53,199,0.6);
}

.btn-primary:active{
  background:var(--indigo-deep);
  box-shadow:none;
}

.btn-ghost{
  background:var(--card);
  border-color:var(--ink);
  color:var(--ink);
}

.btn-ghost:hover{
  border-color:#F0353F;
  color:#F0353F;
  background:#FFF9F9;
}

.btn-ghost:active{
  border-color:#D92D36;
  color:#D92D36;
}

/* ---------- Outline button ---------- */
.btn-outline{
  background:#fff;
  border:1px solid var(--indigo);
  color:var(--indigo-deep);
  border-radius:10px;
  font-weight:700;
  font-size:0.9rem;
  padding:10px 18px;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

.btn-outline:hover{
  background:var(--indigo-tint);
  box-shadow:0 5px 14px -9px rgba(79,70,229,0.45);
}

.btn-outline:focus{
  outline:none;
}

.btn-outline:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.btn-outline:active{
  transform:scale(0.97);
  box-shadow:none;
}

/* ---------- Single/all download button ---------- */
.btn-download-all{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  background:var(--indigo);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:13px 22px;
  font-size:0.95rem;
  font-weight:900;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    background .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

.btn-download-all:hover{
  background:var(--indigo-deep);
  box-shadow:0 7px 18px -10px rgba(62,53,199,0.65);
}

.btn-download-all:focus{
  outline:none;
}

.btn-download-all:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.btn-download-all:active{
  transform:scale(0.97);
  box-shadow:none;
}

/* ---------- Progress bar ---------- */
.progress-wrap{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
}

.progress-track{
  flex:1;
  height:8px;
  border-radius:999px;
  background:var(--line);
  overflow:hidden;
}

.progress-fill{
  height:100%;
  width:0%;
  background:var(--indigo);
  border-radius:999px;
  transition:width .2s ease;
}

.progress-label{
  font-size:0.82rem;
  color:var(--ink-soft);
  white-space:nowrap;
  flex:none;
}

/* ---------- Batch summary ---------- */
.batch-summary{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  width:100%;
  background:var(--calc-tint);
  border:1px solid #CDEEDA;
  border-radius:14px;
  padding:16px;
  text-align:center;
}

.batch-summary-stats{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:10px;
}

.batch-summary .arrow{
  color:var(--ink-soft);
}

.batch-summary strong{
  font-family:var(--font-display);
}

.saved-chip{
  background:var(--calc);
  color:#fff;
  font-size:0.78rem;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
}

.saved-chip.grew{
  background:#B45309;
}

/* ---------- File grid + cards ---------- */
.file-grid{
  display:grid;
  justify-content:center;
  gap:16px;
  grid-template-columns:repeat(auto-fit, 215px);
}

@media(max-width:700px){
  .file-grid{
    grid-template-columns:repeat(auto-fit, 215px);
  }
}

@media(min-width:960px){
  .file-grid{
    justify-content:center;
    grid-template-columns:repeat(auto-fit, 215px);
  }
}

.file-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.file-card:hover{
  border-color:#F0353F;
  box-shadow:0 8px 24px -16px rgba(240,53,63,0.35);
  transform:translateY(-1px);
}

.file-card-preview{
  position:relative;
  aspect-ratio:16/10;
  background:#F1F0F5;
  overflow:hidden;
}

.file-card-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* ---------- Remove image button ---------- */
.btn-remove-image{
  position:absolute;
  top:8px;
  right:8px;
  width:26px;
  height:26px;
  border-radius:50%;
  background:rgba(22,26,43,0.65);
  border:0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    background .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

.btn-remove-image:hover{
  background:#F0353F;
  box-shadow:0 4px 10px -6px rgba(240,53,63,0.7);
}

.btn-remove-image:focus{
  outline:none;
}

.btn-remove-image:focus-visible{
  outline:2px solid #fff;
  outline-offset:2px;
}

.btn-remove-image:active{
  transform:scale(0.9);
  box-shadow:none;
}

.file-card-body{
  padding:14px 16px 16px;
  text-align:center;
}

.file-card-name{
  font-weight:700;
  font-size:0.92rem;
  margin-bottom:4px;
  word-break:break-word;
}

.file-card-size{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:0.85rem;
  color:var(--ink-soft);
  margin-bottom:2px;
  flex-wrap:wrap;
}

.file-card-size .before-size{
  text-decoration:line-through;
  opacity:0.7;
}

.file-card-size .after-size{
  font-weight:700;
  color:var(--ink);
}

.file-card-size .saved-chip{
  background:var(--calc-tint);
  color:#1C7C4F;
  font-size:0.72rem;
  padding:2px 8px;
}

.file-card-size .saved-chip.grew{
  background:#FDECC8;
  color:#8A5A00;
}

.file-card-dims{
  font-size:0.78rem;
  color:var(--ink-soft);
  margin-bottom:12px;
}

.file-card-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}

/* ---------- Small buttons ---------- */
.btn-sm{
  font-size:0.78rem;
  font-weight:700;
  padding:7px 12px;
  border-radius:8px;
  border:1.5px solid var(--ink);
  background:#fff;
  color:var(--ink);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

.btn-sm:hover{
  border-color:#F0353F;
  color:#F0353F;
  background:#FFF9F9;
}

.btn-sm:focus{
  outline:none;
}

.btn-sm:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.btn-sm:active{
  border-color:#D92D36;
  color:#D92D36;
  transform:scale(0.96);
  box-shadow:none;
}

.btn-primary-sm{
  background:var(--indigo);
  color:#fff;
  border-color:var(--indigo);
}

.btn-primary-sm:hover{
  background:var(--indigo-deep);
  border-color:var(--indigo-deep);
  color:#fff;
  box-shadow:0 5px 14px -8px rgba(62,53,199,0.55);
}

.btn-primary-sm:active{
  background:var(--indigo-deep);
  border-color:var(--indigo-deep);
  color:#fff;
}

/* ---------- File-card panels ---------- */
.file-card-panel{
  margin-top:12px;
  padding-top:12px;
  border-top:1px dashed var(--line);
  text-align:center;
}

.file-card-panel label{
  font-size:0.8rem;
  color:var(--ink-soft);
  font-weight:600;
}

.file-card-panel strong{
  color:var(--indigo);
}

/* ---------- Resize quick buttons ---------- */
.resize-quick{
  display:flex;
  justify-content:center;
  gap:6px;
  margin-bottom:10px;
}

.btn-chip{
  font-size:0.76rem;
  font-weight:700;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink-soft);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease,
    transform .15s ease;
}

.btn-chip:hover{
  border-color:var(--indigo);
  color:var(--indigo-deep);
  background:var(--indigo-tint);
}

.btn-chip:focus{
  outline:none;
}

.btn-chip:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:2px;
}

.btn-chip:active{
  transform:scale(0.95);
  background:var(--indigo-tint);
}

.btn-chip.active{background:var(--indigo);border-color:var(--indigo);color:#fff;}

.resize-fields{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.resize-fields label{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:0.8rem;
}

.resize-fields input[type="number"]{
  width:64px;
  padding:6px 8px;
  border:1px solid var(--line);
  border-radius:8px;
  font-size:0.85rem;
  text-align:center;
  outline:none;
  transition:
    border-color .15s ease,
    box-shadow .15s ease;
}

.resize-fields input[type="number"]:hover{
  border-color:#C9C9D8;
}

.resize-fields input[type="number"]:focus{
  border-color:var(--indigo);
  box-shadow:0 0 0 3px rgba(79,70,229,0.10);
  outline:none;
}

.lock-aspect{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:0.78rem;
}

/* ---------- Compress / Resize action tabs ----------
   Connected segmented control, not separate pills — one bordered
   group split into equal segments. Active segment uses --ink (dark
   navy), deliberately different from the indigo action buttons below
   it, so tabs and buttons never look like the same kind of control. */
.action-tabs{
  display:flex;
  width:100%;
  border:1.5px solid var(--ink);
  border-radius:12px;
  overflow:hidden;
  margin-bottom:4px;
}

.action-tab{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:#fff;
  border:0;
  border-right:1.5px solid var(--ink);
  padding:11px 14px;
  font-size:0.9rem;
  font-weight:700;
  color:var(--ink);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    background .15s ease,
    color .15s ease,
    transform .15s ease;
}

.action-tab:last-child{
  border-right:0;
}

.action-tab svg{
  flex:none;
}

.action-tab:hover{
  background:var(--bg);
  color:var(--indigo-deep);
}

.action-tab:focus{
  outline:none;
}

.action-tab:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:-2px;
}

.action-tab:active{
  background:var(--indigo-tint);
  transform:scale(0.99);
}

.action-tab.active{
  background:var(--ink);
  color:#fff;
}

.action-panel{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
}

/* ---------- Batch resize mode tabs ---------- */
.resize-mode-tabs{
  display:flex;
  width:100%;
  border:1.5px solid var(--ink);
  border-radius:10px;
  overflow:hidden;
  margin-bottom:10px;
}

.mode-tab{
  flex:1;
  background:#fff;
  border:0;
  border-right:1.5px solid var(--ink);
  padding:8px 10px;
  font-size:0.78rem;
  font-weight:700;
  color:var(--ink);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  outline:none;
  transition:
    background .15s ease,
    color .15s ease,
    transform .15s ease;
}

.mode-tab:last-child{
  border-right:0;
}

.mode-tab:hover{
  background:var(--bg);
  color:var(--indigo-deep);
}

.mode-tab:focus{
  outline:none;
}

.mode-tab:focus-visible{
  outline:2px solid var(--indigo);
  outline-offset:-2px;
}

.mode-tab:active{
  background:var(--indigo-tint);
  transform:scale(0.99);
}

.mode-tab.active{
  background:var(--ink);
  color:#fff;
}

.resize-mode-panel{
  width:100%;
}

.field-note{
  font-size:0.76rem;
  color:var(--ink-soft);
  margin-top:2px;
}

.recommended-badge{
  display:inline-block;
  background:var(--calc-tint);
  color:#1C7C4F;
  font-size:0.68rem;
  font-weight:700;
  padding:2px 8px;
  border-radius:999px;
  margin-left:2px;
  vertical-align:middle;
}

/* ---------- Below-dropzone bold intro ---------- */
.tool-intro{
  max-width:760px;
  margin:32px auto 0;
  text-align:center;
}

.tool-intro h2{
  font-size:clamp(1.3rem,2.4vw,1.7rem);
  margin-bottom:12px;
}

.tool-intro p{
  color:var(--ink-soft);
  font-size:1rem;
  line-height:1.6;
  margin-bottom:20px;
}

.tool-intro strong{
  color:var(--ink);
}

.feature-pills{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
}

.feature-pill{
  background:var(--indigo-tint);
  color:var(--indigo-deep);
  font-size:0.85rem;
  font-weight:700;
  padding:9px 16px;
  border-radius:999px;
}


/* ===================================================================
   Remove image background (remove-background.php)
   =================================================================== */
.file-card-preview.bg-checker{
  background-image:linear-gradient(45deg,#E4E2ED 25%,transparent 25%),linear-gradient(-45deg,#E4E2ED 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#E4E2ED 75%),linear-gradient(-45deg,transparent 75%,#E4E2ED 75%);
  background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;background-color:#F8F7FB;
}

/* ---------- Solid-color background picker (remove-background tool) ---------- */
.bg-color-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:center;}
.bg-color-row input[type="color"]{width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:8px;cursor:pointer;background:none;}
.bg-color-swatches{display:flex;gap:6px;}
.bg-swatch{width:24px;height:24px;border-radius:50%;border:1px solid rgba(0,0,0,0.12);cursor:pointer;padding:0;}
.bg-swatch:hover{transform:scale(1.1);}


/* ===================================================================
   Crop editor modal (crop-image.php)
   =================================================================== */
.crop-editor{
  position:fixed;inset:0;z-index:300;background:rgba(15,15,26,0.72);
  display:flex;align-items:center;justify-content:center;padding:20px;
}
.crop-editor-inner{
  background:var(--card);border-radius:18px;width:100%;max-width:760px;max-height:92vh;
  overflow-y:auto;display:flex;flex-direction:column;
}
.crop-editor-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 22px;border-bottom:1px solid var(--line);
}
.crop-editor-header h3{font-size:1.05rem;}
.crop-editor-close{
  background:none;border:0;color:var(--ink-soft);width:32px;height:32px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
}
.crop-editor-close:hover{background:var(--bg);color:var(--ink);}
.crop-editor-close:focus-visible{outline:2px solid var(--indigo);outline-offset:2px;}

.crop-editor-presets{
  display:flex;flex-wrap:wrap;gap:8px;padding:16px 22px;border-bottom:1px solid var(--line);
}

.crop-stage-wrap{
  background:#15151F;padding:24px;display:flex;align-items:center;justify-content:center;
  min-height:260px;
}
.crop-stage{position:relative;line-height:0;touch-action:none;}
.crop-stage img{display:block;max-width:78vw;max-height:56vh;width:auto;height:auto;user-select:none;-webkit-user-drag:none;}
.crop-box{
  position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,0.55);
  cursor:move;touch-action:none;
}
.crop-handle{
  position:absolute;width:14px;height:14px;background:#fff;border:2px solid var(--indigo);
  border-radius:50%;touch-action:none;transform:translate(-50%,-50%);
}
.crop-handle[data-handle="nw"]{top:0;left:0;cursor:nwse-resize;}
.crop-handle[data-handle="n"]{top:0;left:50%;cursor:ns-resize;}
.crop-handle[data-handle="ne"]{top:0;left:100%;cursor:nesw-resize;}
.crop-handle[data-handle="e"]{top:50%;left:100%;cursor:ew-resize;}
.crop-handle[data-handle="se"]{top:100%;left:100%;cursor:nwse-resize;}
.crop-handle[data-handle="s"]{top:100%;left:50%;cursor:ns-resize;}
.crop-handle[data-handle="sw"]{top:100%;left:0;cursor:nesw-resize;}
.crop-handle[data-handle="w"]{top:50%;left:0;cursor:ew-resize;}

.crop-editor-footer{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:16px 22px;border-top:1px solid var(--line);
}
.crop-dims-label{font-size:0.85rem;font-weight:700;color:var(--ink-soft);}
.crop-editor-actions{display:flex;gap:10px;}

@media(max-width:640px){
  .crop-editor-inner{max-width:100%;border-radius:14px;}
  .crop-stage img{max-width:88vw;max-height:44vh;}
  .crop-editor-footer{flex-direction:column;align-items:stretch;}
  .crop-editor-actions{justify-content:stretch;}
  .crop-editor-actions .btn{flex:1;}
}


/* ===================================================================
   PDF list (merge-pdf.php) — reorderable rows, drag-and-drop + ↑/↓
   =================================================================== */
.pdf-list{display:flex;flex-direction:column;gap:10px;}
.pdf-item{
  display:flex;align-items:center;gap:12px;background:var(--card);
  border:1px solid var(--line);border-radius:12px;padding:10px 12px;
  cursor:grab;transition:border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.pdf-item.dragging{opacity:0.4;}
.pdf-item.drag-over{border-color:var(--indigo);box-shadow:0 0 0 2px var(--indigo-tint);}
.pdf-drag-handle{flex:none;color:var(--ink-soft);display:flex;cursor:grab;}
.pdf-item-icon{flex:none;width:36px;height:36px;border-radius:8px;background:var(--pdf-tint);display:flex;align-items:center;justify-content:center;}
.pdf-item-info{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px;}
.pdf-item-name{font-weight:700;font-size:0.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.pdf-item-meta{font-size:0.78rem;color:var(--ink-soft);}
.pdf-item-order{flex:none;display:flex;flex-direction:column;gap:2px;}
.pdf-item-btn{
  flex:none;width:26px;height:26px;border-radius:7px;border:1px solid var(--line);background:#fff;
  color:var(--ink-soft);display:flex;align-items:center;justify-content:center;cursor:pointer;
  transition:border-color .15s ease, color .15s ease;
}
.pdf-item-btn:hover{border-color:var(--indigo);color:var(--indigo-deep);}
.pdf-item-btn:disabled{opacity:0.35;cursor:not-allowed;}
.pdf-item-btn:disabled:hover{border-color:var(--line);color:var(--ink-soft);}
button.pdf-remove.pdf-item-btn{margin-left:2px;}
button.pdf-remove.pdf-item-btn:hover{border-color:#F0353F;color:#F0353F;}

@media(max-width:560px){
  .pdf-item-name{font-size:0.84rem;}
  .pdf-drag-handle{display:none;} /* native drag is unreliable on touch; ↑/↓ buttons cover it */
}


/* ===================================================================
   Split-PDF controls (split-pdf.php) — page chips + range rows
   =================================================================== */
.page-chip-actions{display:flex;gap:8px;margin:8px 0 10px;}
.page-chip-grid{display:flex;flex-wrap:wrap;gap:6px;}
.page-chip{min-width:34px;text-align:center;}

.range-list{display:flex;flex-direction:column;gap:8px;margin-top:8px;}
.range-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.range-field-label{font-size:0.8rem;color:var(--ink-soft);}
.range-field{width:64px;padding:6px 8px;border:1px solid var(--line);border-radius:8px;font-size:0.85rem;text-align:center;}
.range-remove{margin-left:auto;}
.range-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;}


/* ===================================================================
   Compress-PDF warning note (compress-pdf.php, Strong mode)
   =================================================================== */
.cp-warning{color:#8A5A00;background:#FDECC8;padding:8px 10px;border-radius:8px;margin-top:8px;}



/* Homepage: visually separated tool categories */
.tool-category-list { display: flex; flex-direction: column; gap: 42px; }
.tool-category { min-width: 0; scroll-margin-top: 100px; }
.category-heading {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; margin: 0 0 18px; padding: 0 0 16px;
  border-bottom: 1px solid var(--line); position: relative;
}
.category-heading::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 58px; height: 3px; border-radius: 8px; background: var(--indigo);
}
.category-eyebrow {
  display: inline-block; margin-bottom: 6px; color: var(--indigo);
  font-size: 10px; font-weight: 800; letter-spacing: 1.45px;
}
.category-heading h2 {
  margin: 0; color: var(--ink); font-size: clamp(21px, 2.5vw, 27px);
  font-weight: 800; letter-spacing: -.55px; line-height: 1.25;
}
.category-heading p { margin: 7px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.category-count {
  flex: 0 0 auto; padding: 7px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; color: var(--ink-soft);
  font-size: 11px; font-weight: 750; white-space: nowrap;
}
.category-tool-grid { margin-top: 0; }
.tool-category.category-empty { display: none; }
@media (max-width: 520px) {
  .tool-category-list { gap: 32px; }
  .category-heading { gap: 10px; align-items: flex-start; }
  .category-heading h2 { font-size: 21px; }
  .category-heading p { font-size: 12px; }
  .category-count { padding: 6px 9px; font-size: 10px; }
}


/* Reduce excessive spacing between homepage tool categories */
.tool-category {
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Reduce spacing below category headings */
.category-heading {
    margin-bottom: 16px !important;
}

/* Mobile spacing */
@media (max-width: 768px) {
    .tool-category {
        margin-bottom: 24px !important;
    }

    .category-heading {
        margin-bottom: 12px !important;
    }
}



/* ---------- Mobile footer layout ---------- */
@media (max-width: 560px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 28px;
  }

  .foot-brand {
    grid-column: 1 / -1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .foot-brand p {
    width: 100%;
    max-width: none;
    margin: 12px 0 0;
    text-align: center;
  }

  .foot-grid > div:not(.foot-brand) {
    min-width: 0;
  }

  .foot-grid h4 {
    margin-bottom: 12px;
  }

  .foot-grid ul {
    gap: 9px;
  }

  .foot-bottom {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 8px;
  }
}




