/* ===============================================================
   ImageYeah – shared stylesheet
   =============================================================== */

/* =====================================================
   FONTS (self-hosted, variable: one file covers every weight)
   ===================================================== */
@font-face{
  font-family:"Inter";
  font-style:normal;font-weight:400 700;font-display:swap;
  src:url("/fonts/inter.woff2") format("woff2");
}
@font-face{
  font-family:"Fraunces";
  font-style:normal;font-weight:500 900;font-display:swap;
  src:url("/fonts/fraunces.woff2") format("woff2");
}
@font-face{
  font-family:"JetBrains Mono";
  font-style:normal;font-weight:400 600;font-display:swap;
  src:url("/fonts/jetbrains-mono.woff2") format("woff2");
}

/* =====================================================
   BASE
   Replaces the parts of Bootstrap 5 this site relied on:
   element resets, the 12-column grid, a handful of
   utility classes, and the navbar / dropdown.
   ===================================================== */
*,*::before,*::after{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:1rem;font-weight:400;line-height:1.5;
  color:#212529;background-color:#fff;
  -webkit-text-size-adjust:100%;
  -webkit-tap-highlight-color:transparent;
}
hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}
h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}
h1{font-size:calc(1.375rem + 1.5vw)}
h2{font-size:calc(1.325rem + .9vw)}
h3{font-size:calc(1.3rem + .6vw)}
h4{font-size:calc(1.275rem + .3vw)}
h5{font-size:1.25rem}
h6{font-size:1rem}
@media (min-width:1200px){
  h1{font-size:2.5rem}
  h2{font-size:2rem}
  h3{font-size:1.75rem}
  h4{font-size:1.5rem}
}
p{margin-top:0;margin-bottom:1rem}
ol,ul{padding-left:2rem}
dl,ol,ul{margin-top:0;margin-bottom:1rem}
ol ol,ol ul,ul ol,ul ul{margin-bottom:0}
b,strong{font-weight:bolder}
small{font-size:.875em}
a{color:#0d6efd;text-decoration:underline}
a:hover{color:#0a58ca}
a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}
code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}
code{font-size:.875em;color:#d63384;word-wrap:break-word}
img,svg{vertical-align:middle}
table{caption-side:bottom;border-collapse:collapse}
th{text-align:inherit;text-align:-webkit-match-parent}
tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}
label{display:inline-block}
button{border-radius:0}
button:focus:not(:focus-visible){outline:0}
button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}
button,select{text-transform:none}
[role=button]{cursor:pointer}
select{word-wrap:normal}
[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}
[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}
::-moz-focus-inner{padding:0;border-style:none}
textarea{resize:vertical}
::file-selector-button{font:inherit;-webkit-appearance:button}
summary{display:list-item;cursor:pointer}
[hidden]{display:none!important}

.lead{font-size:1.25rem;font-weight:300}

/* ---------- Grid ---------- */
.container{
  width:100%;
  padding-right:.75rem;padding-left:.75rem;
  margin-right:auto;margin-left:auto;
}
@media (min-width:576px){.container{max-width:540px}}
@media (min-width:768px){.container{max-width:720px}}
@media (min-width:992px){.container{max-width:960px}}
@media (min-width:1200px){.container{max-width:1140px}}
@media (min-width:1400px){.container{max-width:1320px}}

.row{
  --gx:1.5rem;--gy:0;
  display:flex;flex-wrap:wrap;
  margin-top:calc(-1 * var(--gy));
  margin-right:calc(-.5 * var(--gx));
  margin-left:calc(-.5 * var(--gx));
}
.row>*{
  flex-shrink:0;width:100%;max-width:100%;
  padding-right:calc(var(--gx) * .5);
  padding-left:calc(var(--gx) * .5);
  margin-top:var(--gy);
}
.g-3{--gx:1rem;--gy:1rem}
.g-4{--gx:1.5rem;--gy:1.5rem}
.g-5{--gx:3rem;--gy:3rem}

.col-6{flex:0 0 auto;width:50%}
@media (min-width:768px){
  .col-md-4{flex:0 0 auto;width:33.33333333%}
  .col-md-6{flex:0 0 auto;width:50%}
}
@media (min-width:992px){
  .col-lg-2{flex:0 0 auto;width:16.66666667%}
  .col-lg-3{flex:0 0 auto;width:25%}
  .col-lg-4{flex:0 0 auto;width:33.33333333%}
  .col-lg-5{flex:0 0 auto;width:41.66666667%}
  .col-lg-7{flex:0 0 auto;width:58.33333333%}
}

/* ---------- Navbar + dropdown (structure; the look is set under NAVBAR below) ---------- */
.navbar{
  position:relative;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  padding:.5rem 0;
}
.navbar>.container{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}
.navbar-brand{
  padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;
  font-size:1.25rem;text-decoration:none;white-space:nowrap;
}
.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}
.nav-link{display:block;padding:.5rem 1rem;text-decoration:none;background:none;border:0}
.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}
.navbar-collapse:not(.show){display:none}
.navbar-toggler{
  padding:.25rem .75rem;
  font-size:1.25rem;line-height:1;
  color:rgba(0,0,0,.65);background-color:transparent;
  border:1px solid rgba(0,0,0,.15);border-radius:.375rem;
}
.navbar-toggler:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.dropdown{position:relative}
.dropdown-toggle{white-space:nowrap}
.dropdown-toggle::after{
  display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";
  border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;
}
.dropdown-menu{
  position:static;z-index:1000;display:none;
  min-width:10rem;padding:.5rem 0;margin:0;
  font-size:1rem;color:#212529;text-align:left;list-style:none;
  background-color:#fff;background-clip:padding-box;
  border:1px solid rgba(0,0,0,.175);border-radius:.375rem;
}
.dropdown-menu.show{display:block}
.dropdown-item{
  display:block;width:100%;padding:.25rem 1rem;clear:both;
  font-weight:400;color:#212529;text-align:inherit;text-decoration:none;white-space:nowrap;
  background-color:transparent;border:0;border-radius:0;
}

@media (min-width:992px){
  .navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}
  .navbar-expand-lg .navbar-nav{flex-direction:row}
  .navbar-expand-lg .navbar-collapse,
  .navbar-expand-lg .navbar-collapse:not(.show){display:flex;flex-basis:auto}
  .navbar-expand-lg .navbar-toggler{display:none}
  .navbar-expand-lg .dropdown-menu{position:absolute;top:100%;right:0;left:auto}
}

/* ---------- Utilities (kept last in this section so they win over the rules above) ---------- */
.text-center{text-align:center!important}
.mx-auto{margin-right:auto!important;margin-left:auto!important}
.ms-auto{margin-left:auto!important}
.mt-3{margin-top:1rem!important}
.mb-3{margin-bottom:1rem!important}
.mb-4{margin-bottom:1.5rem!important}
.mb-5{margin-bottom:3rem!important}
.border-0{border:0!important}
.align-items-center{align-items:center!important}
@media (min-width:992px){.align-items-lg-center{align-items:center!important}}
.sticky-top{position:sticky;top:0;z-index:1020}
.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* =====================================================
   THEME
   ===================================================== */

:root{
  --bg-0:#f8fafc;
  --bg-1:#ffffff;
  --bg-2:#f1f5f9;
  --bg-3:#e2e8f0;
  --border:#e2e8f0;
  --border-strong:#cbd5e1;
  --text:#0f172a;
  --text-dim:#475569;
  --text-mute:#64748b;
  --accent:#0ea5e9;
  --accent-2:#0284c7;
  --accent-3:#7dd3fc;
  --accent-soft:rgba(14,165,233,.10);
  --accent-glow:rgba(14,165,233,.25);
  --teal:#14b8a6;
  --pink:#ec4899;
  --amber:#f59e0b;
  --danger:#ef4444;
  --success:#10b981;
  --radius:14px;
  --shadow-sm:0 1px 2px rgba(15,23,42,.04), 0 1px 0 rgba(255,255,255,.6) inset;
  --shadow-md:0 12px 32px rgba(15,23,42,.08), 0 1px 0 rgba(255,255,255,.6) inset;
  --shadow-lg:0 20px 60px rgba(15,23,42,.10), 0 1px 0 rgba(255,255,255,.8) inset;
}

html{scroll-behavior:smooth}
body{
  background:var(--bg-0);
  color:var(--text);
  font-family:"Inter",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-size:16.5px;line-height:1.65;min-height:100vh;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* cursor-following spotlight */
body::before{
  content:"";
  position:fixed;
  top:var(--cursor-y,50%);
  left:var(--cursor-x,50%);
  width:600px;height:600px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(14,165,233,.08),transparent 70%);
  transform:translate(-50%,-50%);
  pointer-events:none;
  z-index:0;
  transition:opacity .3s ease;
  opacity:var(--cursor-opacity,0);
}

h1,h2,h3,h4{
  font-family:"Fraunces",Georgia,serif;
  font-weight:700;letter-spacing:-.02em;color:var(--text);
}
h1{font-size:clamp(2.4rem,5vw,3.8rem);line-height:1.05;font-weight:900}
h2{font-size:clamp(1.7rem,2.8vw,2.3rem);line-height:1.15;margin-bottom:.75rem}
h3{font-size:1.2rem;font-weight:700}
p{color:var(--text-dim)}

.section{padding:5rem 0;position:relative;z-index:1}
.section-tight{padding:3.5rem 0;position:relative;z-index:1}

.eyebrow{
  display:inline-block;
  font-family:"JetBrains Mono",monospace;
  font-size:.74rem;letter-spacing:.2em;text-transform:uppercase;
  padding:.4rem .8rem;
  border:1px solid var(--border-strong);
  border-radius:999px;
  margin-bottom:1rem;
  background:var(--bg-1);
  color:var(--accent-2);
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar{
  background:rgba(248,250,252,.85);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--border);
  padding:.85rem 0;
}
.brand{
  display:flex;align-items:center;gap:.65rem;
  font-family:"Fraunces",serif;
  font-weight:900;font-size:1.3rem;
  color:var(--text)!important;
  letter-spacing:-.02em;
  text-decoration:none;
}
.brand-mark{
  display:grid;place-items:center;
  width:36px;height:36px;border-radius:10px;
  background:linear-gradient(135deg,var(--accent) 0%,var(--teal) 60%,#22d3ee 100%);
  color:#fff;font-weight:900;font-size:.95rem;flex:none;
  box-shadow:0 0 0 1px rgba(255,255,255,.1),0 6px 18px rgba(14,165,233,.32);
  font-family:"JetBrains Mono",monospace;
}
.navbar .nav-link{
  color:var(--text-dim)!important;
  font-weight:500;
  font-size:.94rem;
  padding:.5rem .85rem!important;
  border-radius:8px;
  transition:all .15s ease;
  display:inline-flex;align-items:center;gap:.4rem;
}
.navbar .nav-link:hover{
  color:var(--text)!important;
  background:var(--bg-2);
}
.navbar .nav-link.active{
  color:#fff!important;
  background:var(--text);
}
.navbar .nav-link i{font-size:.9rem;opacity:.7}
.navbar .nav-link.active i{opacity:1}

/* "More Tools" dropdown */
.navbar .dropdown-toggle::after{
  margin-left:.35rem;
  border-top-color:currentColor;
  opacity:.7;
}
.navbar .dropdown-menu{
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--shadow-lg);
  background:var(--bg-1);
  padding:.4rem;
  margin-top:.4rem;
  min-width:220px;
}
.navbar .dropdown-item{
  display:flex;align-items:center;gap:.55rem;
  padding:.55rem .75rem;
  border-radius:8px;
  color:var(--text-dim);
  font-weight:500;
  font-size:.94rem;
  transition:background .15s ease, color .15s ease;
}
.navbar .dropdown-item i{
  font-size:.95rem;
  color:var(--text-mute);
  width:1.1em;
  text-align:center;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus{
  background:var(--bg-2);
  color:var(--text);
}
.navbar .dropdown-item:hover i,
.navbar .dropdown-item:focus i{ color:var(--accent); }
.navbar .dropdown-item.active{
  background:var(--text);
  color:#fff;
}
.navbar .dropdown-item.active i{ color:#fff; }

@media (max-width:991.98px){
  .navbar-collapse{padding-top:.6rem}
  /* the bar is sticky, so let a long open menu scroll inside the screen */
  .navbar-collapse.show{max-height:calc(100vh - 5rem);max-height:calc(100dvh - 5rem);overflow-y:auto;overscroll-behavior:contain}
  .navbar .nav-link{margin:.1rem 0}
  /* In the mobile collapsed nav, render the dropdown items inline as flat list */
  .navbar .dropdown-menu{
    border:0;box-shadow:none;background:transparent;
    padding:0;margin:0;min-width:0;
  }
  .navbar .dropdown-item{
    padding:.5rem .85rem;
    font-size:.94rem;
  }
}

/* =====================================================
   STICKY LEFT SHARE BAR
   ===================================================== */
.share-rail{
  position:fixed;
  left:.85rem;
  top:50%;
  transform:translateY(-50%);
  z-index:40;
  display:flex;flex-direction:column;align-items:center;gap:.45rem;
  padding:.7rem .4rem;
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(180%) blur(12px);
  -webkit-backdrop-filter:saturate(180%) blur(12px);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow-md);
}
.share-rail-label{
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  font-family:"JetBrains Mono",monospace;
  font-size:.65rem;letter-spacing:.25em;text-transform:uppercase;
  color:var(--text-mute);
  padding:.35rem 0 .55rem;
  font-weight:600;
}
.share-rail a{
  width:36px;height:36px;
  display:grid;place-items:center;
  border-radius:9px;
  color:var(--text-dim);
  background:var(--bg-1);
  border:1px solid var(--border);
  font-size:1rem;
  text-decoration:none;
  transition:all .15s ease;
}
.share-rail a:hover{
  color:#fff;
  border-color:transparent;
  transform:translateY(-1px);
}
.share-rail a[data-share="linkedin"]:hover{background:#0a66c2}
.share-rail a[data-share="facebook"]:hover{background:#1877f2}
.share-rail a[data-share="twitter"]:hover{background:#0f172a}
.share-rail a[data-share="email"]:hover{background:var(--accent)}

@media (max-width:1199.98px){
  .share-rail{display:none}
}

/* =====================================================
   HERO
   ===================================================== */
.hero{
  padding:3.5rem 0 2.5rem;
  position:relative;
  overflow:hidden;
}
.hero-bg{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  background:
    radial-gradient(800px 400px at 85% -10%,rgba(20,184,166,.10),transparent 60%),
    radial-gradient(700px 400px at -5% 30%,rgba(14,165,233,.10),transparent 60%);
}
.hero-bg::before{
  content:"";position:absolute;inset:0;
  background-image:
    linear-gradient(rgba(15,23,42,.04) 1px,transparent 1px),
    linear-gradient(90deg,rgba(15,23,42,.04) 1px,transparent 1px);
  background-size:40px 40px;
  mask-image:radial-gradient(ellipse at center,#000 30%,transparent 75%);
  -webkit-mask-image:radial-gradient(ellipse at center,#000 30%,transparent 75%);
}

.orb{
  position:absolute;border-radius:50%;
  filter:blur(40px);opacity:.4;pointer-events:none;z-index:0;
  animation:float 14s ease-in-out infinite;
}
.orb-1{width:280px;height:280px;background:var(--accent);top:8%;right:-3%;animation-delay:0s}
.orb-2{width:220px;height:220px;background:var(--teal);bottom:5%;left:-2%;animation-delay:-5s}
.orb-3{width:160px;height:160px;background:var(--accent-3);top:40%;left:55%;animation-delay:-9s;opacity:.3}
@keyframes float{
  0%,100%{transform:translate(0,0) scale(1)}
  33%{transform:translate(40px,-30px) scale(1.05)}
  66%{transform:translate(-30px,30px) scale(.95)}
}

.hero-content{position:relative;z-index:2}
.hero h1 .accent{
  background:linear-gradient(135deg,var(--accent) 0%,var(--teal) 100%);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
}
.hero p.lead{
  color:var(--text-dim);
  max-width:660px;margin:0 auto;
  font-size:1.1rem;
}

/* =====================================================
   TOOL CARD
   ===================================================== */
.tool-card{
  background:var(--bg-1);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow-lg);
  padding:1.25rem;
  position:relative;
  overflow:hidden;
  z-index:2;
}
.tool-card::before{
  content:"";position:absolute;inset:0;border-radius:18px;padding:1px;
  background:linear-gradient(135deg,rgba(14,165,233,.25),rgba(20,184,166,.15),transparent 60%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
  pointer-events:none;
}

.drop-zone{
  border:2px dashed var(--border-strong);
  border-radius:14px;
  padding:2.5rem 1.5rem;
  text-align:center;
  cursor:pointer;
  background:linear-gradient(180deg,var(--bg-2),var(--bg-1));
  transition:all .2s ease;
  position:relative;
}
.drop-zone:hover{
  border-color:var(--accent);
  background:linear-gradient(180deg,rgba(14,165,233,.04),var(--bg-1));
}
.drop-zone.dragging{
  border-color:var(--accent);
  background:rgba(14,165,233,.06);
  transform:scale(1.005);
}
.drop-zone-icon{
  width:60px;height:60px;margin:0 auto .9rem;
  border-radius:14px;
  background:linear-gradient(135deg,var(--accent) 0%,var(--teal) 100%);
  display:grid;place-items:center;
  color:#fff;font-size:1.6rem;
  box-shadow:0 8px 22px rgba(14,165,233,.32);
}
.drop-zone-title{
  font-size:1.05rem;font-weight:600;color:var(--text);margin:0 0 .35rem;
}
.drop-zone-hint{
  font-size:.88rem;color:var(--text-mute);margin:0;
}
.drop-zone input[type="file"]{display:none}

.error-banner{
  background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;
  padding:.75rem 1rem;border-radius:10px;margin-top:1rem;font-size:.92rem;
}

.selected-files{
  text-align:center;
  padding:.75rem;
  color:var(--text-mute);
  font-size:.95rem;
  min-height:1.5rem;
}
.selected-files.has-files{color:var(--text)}
.selected-files i{color:var(--success);margin-right:.3rem}

/* compress controls */
.compress-controls{
  display:flex;align-items:center;gap:1rem;
  padding:.5rem;
  flex-wrap:wrap;
}
.quality-control{
  flex:1;min-width:240px;
  display:flex;align-items:center;gap:.7rem;
  background:var(--bg-2);
  border:1px solid var(--border);
  padding:.5rem .85rem;border-radius:10px;
  font-size:.92rem;color:var(--text-dim);font-weight:500;
}
.quality-control i{color:var(--accent)}
.quality-control input[type="range"]{
  flex:1;accent-color:var(--accent);
}
.quality-value{
  font-family:"JetBrains Mono",monospace;
  color:var(--accent-2);font-weight:600;min-width:42px;text-align:right;
}
.compress-btn{
  background:linear-gradient(135deg,var(--accent) 0%,var(--accent-2) 100%);
  color:#fff;border:0;
  padding:.75rem 1.4rem;border-radius:10px;
  font-weight:600;font-size:.97rem;
  cursor:pointer;
  display:inline-flex;align-items:center;gap:.5rem;
  font-family:inherit;
  box-shadow:0 6px 18px rgba(14,165,233,.28);
  transition:all .15s ease;
}
.compress-btn:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(14,165,233,.36);
}
.compress-btn:disabled{
  background:var(--bg-3);color:var(--text-mute);
  cursor:not-allowed;box-shadow:none;
}

/* =====================================================
   ADVANCED OPTIONS, shared widget block for tool pages
   (Resize, JPG, WebP, Rotate, etc.)
   ===================================================== */
.advanced-options{
  padding:.9rem 1rem;
  margin:.25rem 0;
  background:var(--bg-2);
  border:1px solid var(--border);
  border-radius:12px;
}
.advanced-options-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem 1.2rem;
}
@media (max-width:720px){
  .advanced-options-grid{grid-template-columns:1fr}
}
.advanced-option{
  display:flex;flex-direction:column;gap:.4rem;
  min-width:0; /* prevents grid blow-out */
}
.advanced-option-label{
  display:flex;align-items:center;justify-content:space-between;
  font-size:.82rem;font-weight:600;color:var(--text);
  font-family:"Inter",sans-serif;
  margin:0;
}
.advanced-option-label small{
  color:var(--text-mute);font-weight:400;
  font-size:.78rem;
}
.advanced-option select,
.advanced-option input[type="number"],
.advanced-option input[type="text"]{
  width:100%;
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  padding:.5rem .65rem;
  font-family:inherit;font-size:.92rem;
  color:var(--text);
}
.advanced-option select:focus,
.advanced-option input[type="number"]:focus,
.advanced-option input[type="text"]:focus{
  outline:0;border-color:var(--accent);box-shadow:0 0 0 3px rgba(14,165,233,.15);
}
.advanced-option input[type="color"]{
  width:100%;height:38px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  padding:.25rem;
  cursor:pointer;
}
.advanced-option input[type="range"]{accent-color:var(--accent)}

/* Toggle switch (lossless mode, etc.) */
.toggle-switch{
  display:inline-flex;align-items:center;gap:.6rem;
  cursor:pointer;user-select:none;
  font-size:.92rem;color:var(--text-dim);
}
.toggle-switch input[type="checkbox"]{
  position:absolute;opacity:0;width:0;height:0;
}
.toggle-switch .track{
  position:relative;display:inline-block;
  width:36px;height:20px;border-radius:999px;
  background:var(--bg-3);
  border:1px solid var(--border-strong);
  transition:background .15s ease;
  flex-shrink:0;
}
.toggle-switch .track::after{
  content:"";
  position:absolute;top:1px;left:1px;
  width:16px;height:16px;border-radius:50%;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.2);
  transition:transform .15s ease;
}
.toggle-switch input[type="checkbox"]:checked + .track{
  background:var(--accent);border-color:var(--accent);
}
.toggle-switch input[type="checkbox"]:checked + .track::after{
  transform:translateX(16px);
}

/* Rotate page, radio "pill" group */
.rotate-options{
  display:flex;flex-wrap:wrap;gap:.45rem;
}
.rotate-options input[type="radio"]{
  position:absolute;opacity:0;width:0;height:0;
}
.rotate-options label{
  display:inline-flex;align-items:center;gap:.4rem;
  padding:.55rem .9rem;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  font-size:.88rem;font-weight:500;color:var(--text-dim);
  cursor:pointer;
  transition:all .15s ease;
}
.rotate-options label:hover{
  border-color:var(--border-strong);color:var(--text);
}
.rotate-options input[type="radio"]:checked + label{
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#fff;border-color:var(--accent);
  box-shadow:0 4px 12px rgba(14,165,233,.25);
}
.rotate-options input[type="radio"]:focus-visible + label{
  outline:2px solid var(--accent);outline-offset:2px;
}

/* =====================================================
   SELECTIVE BLUR EDITOR (/blur-image/)
   ===================================================== */
.blur-editor{
  padding:0;
  margin-top:1rem;
}
.blur-canvas-wrap{
  position:relative;
  margin:1rem 0;
  text-align:center;
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-size:20px 20px;
  background-position:0 0, 0 10px, 10px -10px, 10px 0;
  border-radius:12px;
  border:1px solid var(--border);
  padding:8px;
  overflow:hidden;
}
#blurCanvas{
  max-width:100%;
  height:auto;
  display:inline-block;
  border-radius:8px;
  cursor:none; /* hidden, our custom cursor follows the pointer */
  touch-action:none; /* prevent scroll while painting on touch */
  user-select:none;
  -webkit-user-select:none;
}
.blur-cursor{
  position:fixed;
  pointer-events:none;
  border:2px solid var(--accent);
  background:rgba(14,165,233,.10);
  border-radius:50%;
  z-index:9999;
  display:none;
  box-shadow:0 0 0 1px rgba(255,255,255,.7);
}
.blur-actions{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:.8rem;
  margin-top:.5rem;
}
.blur-filename{
  font-size:.9rem;color:var(--text-mute);
  display:inline-flex;align-items:center;gap:.4rem;
  min-width:0;
}
.blur-filename i{ color:var(--accent); }
.blur-filename span{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  max-width:260px;
}
.blur-action-buttons{
  display:flex;gap:.5rem;flex-wrap:wrap;
}
.blur-btn-secondary{
  display:inline-flex;align-items:center;gap:.45rem;
  padding:.65rem 1.15rem;
  background:#fff;
  border:1px solid var(--border-strong);
  border-radius:10px;
  color:var(--text-dim);font-size:.92rem;font-weight:600;
  font-family:inherit;
  cursor:pointer;
  transition:all .15s ease;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.blur-btn-secondary i{
  font-size:1rem;opacity:.85;
}
.blur-btn-secondary:hover{
  border-color:var(--accent);
  color:var(--text);
  background:var(--bg-1);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(14,165,233,.12);
}
.blur-btn-secondary:active{
  transform:translateY(0);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
/* "Reset" gets a subtle warning hint on hover, communicating "destructive" */
.blur-btn-secondary.is-danger:hover{
  border-color:#f87171;
  color:#b91c1c;
  background:#fef2f2;
  box-shadow:0 4px 12px rgba(239,68,68,.14);
}
.blur-btn-secondary.is-danger:hover i{ color:#b91c1c; }

/* =====================================================
   BRIGHTNESS / CONTRAST / SATURATION PREVIEW
   ===================================================== */
.adjust-preview{
  grid-column:1/-1;
  margin-top:1rem;
  padding:1rem;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
}
.adjust-preview-label{
  font-family:"JetBrains Mono",monospace;
  font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;
  color:var(--text-mute);
  margin-bottom:.6rem;
}
.adjust-preview-stage{
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-size:20px 20px;
  background-position:0 0, 0 10px, 10px -10px, 10px 0;
  border-radius:8px;
  text-align:center;
  padding:.5rem;
  overflow:hidden;
}
.adjust-preview-stage img{
  max-width:100%;
  max-height:280px;
  border-radius:6px;
  display:inline-block;
}
.adjust-reset-btn{
  display:inline-flex;align-items:center;gap:.4rem;
  margin-top:.8rem;
  padding:.55rem 1rem;
  background:#fff;
  border:1px solid var(--border-strong);
  border-radius:10px;
  color:var(--text-dim);
  font-family:inherit;font-size:.88rem;font-weight:600;
  cursor:pointer;
  transition:all .15s ease;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.adjust-reset-btn i{
  font-size:.95rem;opacity:.85;
}
.adjust-reset-btn:hover{
  border-color:var(--accent);
  color:var(--text);
  background:var(--bg-1);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(14,165,233,.12);
}
.adjust-reset-btn:active{
  transform:translateY(0);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

/* =====================================================
   EXIF VIEWER (/exif-viewer/)
   ===================================================== */
.exif-result{
  margin-top:1rem;
}
.exif-result-header{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:.8rem;
  margin-bottom:.9rem;
}
.exif-filename{
  font-size:.95rem;color:var(--text-dim);
  display:inline-flex;align-items:center;gap:.5rem;
  min-width:0;
}
.exif-filename i{ color:var(--accent); }
.exif-filename span{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  max-width:280px;
  font-weight:600;
  color:var(--text);
}
.exif-actions{
  display:inline-flex;align-items:center;gap:.6rem;
}
.exif-copy-status{
  font-size:.85rem;color:var(--text-mute);
  font-weight:500;
  transition:color .15s ease;
}
.exif-copy-status.is-success{ color:var(--success, #10b981); }
.exif-metadata{
  width:100%;
  min-height:240px;
  padding:1rem 1.1rem;
  background:#0f172a;
  color:#e2e8f0;
  border:1px solid var(--border-strong);
  border-radius:12px;
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:.86rem;
  line-height:1.55;
  resize:vertical;
  white-space:pre;
  overflow:auto;
  tab-size:2;
}
.exif-metadata:focus{
  outline:0;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(14,165,233,.20);
}
.exif-no-metadata{
  margin:.8rem 0 0;
  padding:.9rem 1rem;
  background:var(--bg-2);
  border:1px solid var(--border);
  border-radius:10px;
  font-size:.9rem;color:var(--text-dim);
  line-height:1.5;
}
.exif-no-metadata i{ color:var(--accent); margin-right:.3rem; }

.exif-gps-callout{
  display:flex;align-items:center;gap:.85rem;
  margin-bottom:.9rem;
  padding:.7rem 1rem;
  background:linear-gradient(135deg, #ecfdf5, #f0fdfa);
  border:1px solid #a7f3d0;
  border-radius:12px;
}
.exif-gps-icon{
  width:38px;height:38px;
  display:grid;place-items:center;
  background:linear-gradient(135deg, var(--accent), var(--teal, #14b8a6));
  color:#fff;
  border-radius:10px;
  font-size:1.1rem;
  flex-shrink:0;
}
.exif-gps-text{
  display:flex;flex-direction:column;gap:.1rem;min-width:0;
}
.exif-gps-label{
  font-family:"JetBrains Mono",monospace;
  font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;
  color:#047857;
  font-weight:600;
}
.exif-gps-link{
  color:#065f46;
  font-weight:600;
  font-size:.95rem;
  text-decoration:none;
  display:inline-flex;align-items:center;gap:.4rem;
}
.exif-gps-link:hover{
  text-decoration:underline;
  color:#064e3b;
}
.exif-gps-link i{ font-size:.85rem; opacity:.7; }

.exif-remove-cta{
  margin-top:1rem;
  padding:.85rem 1.1rem;
  background:linear-gradient(135deg, #fef3c7, #fffbeb);
  border:1px solid #fcd34d;
  border-radius:12px;
  display:flex;align-items:flex-start;gap:.7rem;
  font-size:.93rem;color:#78350f;
  line-height:1.5;
}
.exif-remove-cta i{
  color:#d97706;
  font-size:1.15rem;
  flex-shrink:0;
  margin-top:.05rem;
}
.exif-remove-cta a{
  color:#7c2d12;
  font-weight:700;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:2px;
}
.exif-remove-cta a:hover{
  color:#451a03;
}

/* =====================================================
   RESULTS
   ===================================================== */
.results-section{
  margin-top:1rem;
  padding:1rem;
  background:var(--bg-2);
  border-radius:12px;
  border:1px solid var(--border);
}
.results-empty{
  text-align:center;color:var(--text-mute);
  font-size:.92rem;padding:1.25rem;
}
.results-summary{
  display:flex;align-items:center;justify-content:space-between;
  gap:1rem;flex-wrap:wrap;
  padding:.85rem 1.1rem;
  background:var(--bg-1);
  border:1px solid var(--border);
  border-radius:12px;
  margin-bottom:.8rem;
}
.summary-stats{display:flex;gap:1.6rem;flex-wrap:wrap}
.summary-stat{display:flex;flex-direction:column}
.summary-stat-label{
  font-family:"JetBrains Mono",monospace;
  font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;
  color:var(--text-mute);
}
.summary-stat-value{
  font-weight:700;font-size:1.05rem;color:var(--text);
  font-variant-numeric:tabular-nums;
}
.summary-stat-value.savings{color:var(--success)}
.download-all-btn{
  background:var(--text);color:#fff;border:0;
  padding:.6rem 1.1rem;border-radius:10px;
  font-size:.9rem;font-weight:600;cursor:pointer;
  display:inline-flex;align-items:center;gap:.5rem;
  font-family:inherit;
  transition:all .15s ease;
}
.download-all-btn:hover:not(:disabled){
  background:#1e293b;transform:translateY(-1px);
}
.download-all-btn:disabled{
  background:#94a3b8;cursor:not-allowed;opacity:.7;
}

.file-row{
  display:grid;
  grid-template-columns:1fr auto auto auto auto;
  align-items:center;gap:1rem;
  background:var(--bg-1);
  border:1px solid var(--border);
  border-radius:10px;
  padding:.75rem 1rem;
  margin-bottom:.45rem;
  box-shadow:var(--shadow-sm);
}
.file-row:last-child{margin-bottom:0}
.file-name{
  font-size:.92rem;color:var(--text);font-weight:500;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  display:flex;align-items:center;gap:.6rem;
}
.file-name i{color:var(--accent);flex-shrink:0}
.file-size{
  font-size:.85rem;color:var(--text-mute);
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.file-arrow{color:#cbd5e1}
.file-savings{
  font-size:.82rem;font-weight:600;font-variant-numeric:tabular-nums;
  padding:.25rem .6rem;border-radius:6px;white-space:nowrap;
}
.file-savings.positive{background:#ecfdf5;color:var(--success)}
.file-savings.negative{background:#fef2f2;color:var(--danger)}
.file-savings.neutral{background:var(--bg-2);color:var(--text-mute)}
.file-status{
  font-size:.85rem;color:var(--text-mute);
  display:inline-flex;align-items:center;gap:.5rem;
}
.file-status .spinner{
  width:14px;height:14px;
  border:2px solid var(--bg-3);
  border-top-color:var(--accent);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.file-status.error{color:var(--danger)}
.file-download{
  color:var(--accent-2);text-decoration:none;
  font-size:.85rem;font-weight:600;
  padding:.35rem .7rem;
  border:1px solid #bae6fd;background:#e0f2fe;
  border-radius:8px;
  transition:all .15s ease;white-space:nowrap;
}
.file-download:hover{
  background:var(--accent);color:#fff;border-color:var(--accent);
}

@media (max-width:720px){
  .file-row{grid-template-columns:1fr auto;gap:.6rem}
  .file-name{grid-column:1/-1}
  .file-arrow{display:none}
  .results-summary{flex-direction:column;align-items:stretch}
  .download-all-btn{justify-content:center}
  .compress-controls{flex-direction:column;align-items:stretch}
  .quality-control{justify-content:space-between}
}

/* =====================================================
   CARDS / FEATURES / STEPS / USES
   ===================================================== */
.card-pt{
  background:var(--bg-1);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:1.5rem;
  height:100%;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.card-pt:hover{
  transform:translateY(-3px);
  border-color:var(--accent-3);
  box-shadow:var(--shadow-md);
}
.card-icon{
  width:44px;height:44px;border-radius:11px;
  background:var(--accent-soft);color:var(--accent-2);
  display:grid;place-items:center;font-size:1.2rem;
  margin-bottom:1rem;
  border:1px solid #bae6fd;
}
.card-pt h3{margin-bottom:.4rem}
.card-pt p{margin:0;font-size:.95rem}

.step{
  display:flex;gap:1.1rem;
  padding:1.5rem;
  background:var(--bg-1);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  height:100%;
}
.step-num{
  flex:0 0 auto;
  font-family:"Fraunces",serif;font-weight:900;
  font-size:2.1rem;line-height:1;
  background:linear-gradient(135deg,var(--accent),var(--teal));
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
  min-width:2.3rem;
}

.uses-list{
  list-style:none;padding:0;margin:0;
  display:grid;grid-template-columns:repeat(2,1fr);gap:.7rem;
}
@media (max-width:700px){.uses-list{grid-template-columns:1fr}}
.uses-list li{
  background:var(--bg-1);border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  padding:.9rem 1rem;border-radius:10px;
  display:flex;align-items:center;gap:.75rem;
  color:var(--text);font-weight:500;
  transition:border-color .15s ease;
}
.uses-list li:hover{border-color:var(--accent-3)}
.uses-list li i{color:var(--accent);font-size:1.1rem}

/* =====================================================
   FORMAT COMPARISON TABLE
   ===================================================== */
.format-table-wrap{
  background:var(--bg-1);border:1px solid var(--border);
  border-radius:var(--radius);box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.format-table{
  width:100%;border-collapse:separate;border-spacing:0;
}
.format-table th,.format-table td{
  padding:.95rem 1.2rem;text-align:left;
  border-bottom:1px solid var(--border);font-size:.94rem;
}
.format-table th{
  background:var(--bg-2);color:var(--text-mute);
  font-family:"JetBrains Mono",monospace;
  font-size:.74rem;letter-spacing:.15em;text-transform:uppercase;
  font-weight:600;
}
.format-table tbody td:first-child{
  font-weight:700;color:var(--text);font-family:"Fraunces",serif;
}
.format-table tr:last-child td{border-bottom:0}
.format-table tr:hover td{background:var(--bg-2)}
.tag-pill{
  display:inline-block;
  font-size:.78rem;font-weight:600;
  padding:.2rem .55rem;border-radius:6px;
  font-family:"JetBrains Mono",monospace;
}
.tag-pill.good{background:#ecfdf5;color:var(--success)}
.tag-pill.ok{background:#fffbeb;color:#b45309}
.tag-pill.bad{background:#fef2f2;color:var(--danger)}

/* =====================================================
   FAQ
   ===================================================== */
.faq-item{
  background:var(--bg-1);border:1px solid var(--border);
  border-radius:12px;
  margin-bottom:.7rem;
  overflow:hidden;
  transition:border-color .15s ease;
}
.faq-item:hover{border-color:var(--border-strong)}
.faq-item details summary{
  list-style:none;cursor:pointer;
  padding:1.1rem 1.3rem;
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  font-weight:600;color:var(--text);
  font-family:"Fraunces",serif;font-size:1.05rem;
}
.faq-item details summary::-webkit-details-marker{display:none}
.faq-item details summary::after{
  content:"+";
  font-family:"JetBrains Mono",monospace;
  font-weight:400;font-size:1.4rem;color:var(--accent);
  transition:transform .2s ease;
  line-height:1;
}
.faq-item details[open] summary::after{
  content:"−";transform:rotate(0deg);
}
.faq-item details[open] summary{
  border-bottom:1px solid var(--border);
}
.faq-answer{
  padding:1.1rem 1.3rem;color:var(--text-dim);font-size:.97rem;
}
.faq-answer p:last-child{margin-bottom:0}

/* =====================================================
   TOOL TILES (cross-promo)
   ===================================================== */
.tool-tile{
  display:flex;gap:.9rem;align-items:flex-start;
  padding:1.1rem 1.2rem;
  background:var(--bg-1);
  border:1px solid var(--border);
  border-radius:12px;
  text-decoration:none;color:inherit;
  transition:all .15s ease;
  height:100%;
}
.tool-tile:hover{
  border-color:var(--accent-3);
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
}
.tool-tile-icon{
  flex:0 0 auto;
  width:38px;height:38px;border-radius:10px;
  display:grid;place-items:center;
  font-size:1.05rem;color:#fff;
}
.tool-tile-icon.c1{background:linear-gradient(135deg,#0ea5e9,#0284c7)}
.tool-tile-icon.c2{background:linear-gradient(135deg,#14b8a6,#0d9488)}
.tool-tile-icon.c3{background:linear-gradient(135deg,#8b5cf6,#7c3aed)}
.tool-tile-icon.c4{background:linear-gradient(135deg,#f59e0b,#d97706)}
.tool-tile-icon.c5{background:linear-gradient(135deg,#ec4899,#db2777)}
.tool-tile-icon.c6{background:linear-gradient(135deg,#10b981,#059669)}
.tool-tile-icon.c7{background:linear-gradient(135deg,#64748b,#334155)}  /* grayscale: slate */
.tool-tile-icon.c8{background:linear-gradient(135deg,#6366f1,#4338ca)}  /* rotate: indigo */
.tool-tile-icon.c9{background:linear-gradient(135deg,#f43f5e,#e11d48)}  /* watermark: rose */
.tool-tile-icon.c10{background:linear-gradient(135deg,#06b6d4,#7c3aed)} /* AVIF: cyan→violet (next-gen) */
.tool-tile-icon.c11{background:linear-gradient(135deg,#a8a29e,#57534e)} /* BMP: warm gray (legacy) */
.tool-tile-icon.c12{background:linear-gradient(135deg,#94a3b8,#1e293b)} /* HEIC: graphite (Apple-ish) */
.tool-tile-icon.c13{background:linear-gradient(135deg,#a78bfa,#6d28d9)} /* selective blur: violet */
.tool-tile-icon.c14{background:linear-gradient(135deg,#60a5fa,#1d4ed8)} /* whole-image blur: blue */
.tool-tile-icon.c15{background:linear-gradient(135deg,#fbbf24,#d97706)} /* brightness: gold */
.tool-tile-icon.c16{background:linear-gradient(135deg,#34d399,#0891b2)} /* exif viewer: emerald-cyan */
.tool-tile-icon.c17{background:linear-gradient(135deg,#f472b6,#be185d)} /* svg to png: magenta-pink (vector vibes) */
.tool-tile h4{
  font-family:"Inter",sans-serif;
  font-size:1rem;font-weight:600;margin:0 0 .2rem;color:var(--text);
}
.tool-tile p{font-size:.86rem;margin:0;color:var(--text-mute)}

/* =====================================================
   FOOTER
   ===================================================== */
footer{
  background:var(--bg-1);
  border-top:1px solid var(--border);
  padding:3.5rem 0 1.5rem;
  margin-top:4rem;
  position:relative;z-index:1;
}
footer h3{
  font-family:"Inter",sans-serif;
  font-size:.82rem;font-weight:700;
  text-transform:uppercase;letter-spacing:.14em;
  color:var(--text);margin-bottom:1.1rem;
}
footer ul{list-style:none;padding:0;margin:0}
footer ul li{margin-bottom:.55rem}
footer ul li a{
  color:var(--text-dim);font-size:.93rem;
  text-decoration:none;transition:color .15s ease;
}
footer ul li a:hover{color:var(--accent-2)}
.footer-tagline{color:var(--text-dim);font-size:.93rem;max-width:320px;margin-bottom:1rem}

.footer-share{
  display:flex;gap:1.1rem;align-items:center;flex-wrap:wrap;
}
.footer-share a{
  display:inline-flex;align-items:center;justify-content:center;
  color:var(--text);
  font-size:1.45rem;
  text-decoration:none;
  transition:color .15s ease, transform .15s ease;
  line-height:1;
}
.footer-share a:hover{
  color:var(--accent);
  transform:translateY(-1px);
}

.footer-bottom{
  margin-top:2.8rem;padding-top:1.5rem;
  border-top:1px solid var(--border);
  display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:.8rem;
  color:var(--text-mute);font-size:.88rem;
}

/* =====================================================
   POPULAR KEYWORDS CLOUD
   ===================================================== */
.kw-cloud{
  list-style:none;padding:0;margin:1.5rem 0 0;
  display:flex;flex-wrap:wrap;justify-content:center;
  gap:.55rem;
}
.kw{
  --kw-delay: 0s;
  --kw-dur: 4s;
  --kw-amp: 6px;
  display:inline-flex;align-items:center;
  padding:.5rem .9rem;
  font-size:.88rem;font-weight:500;
  color:var(--text-dim);
  background:var(--bg-1);
  border:1px solid var(--border);
  border-radius:999px;
  cursor:default;
  transition:transform .15s ease, color .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
  animation: kw-float var(--kw-dur) ease-in-out infinite;
  animation-delay: var(--kw-delay);
  will-change: transform;
}
.kw:hover{
  color:var(--text);
  border-color:var(--accent-3);
  background:var(--bg-1);
  transform:translateY(-2px) scale(1.04);
  box-shadow:var(--shadow-md);
  animation-play-state: paused;
}
.kw-hot{
  color:var(--accent-2);
  background:linear-gradient(180deg, #f0f9ff, #ffffff);
  border-color:#bae6fd;
  font-weight:600;
}
.kw-hot .bi-fire{
  margin-right:.4rem;
  font-size:.9em;
  color:var(--accent);
  transition:color .15s ease;
}
.kw-hot:hover{
  color:#fff;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  border-color:var(--accent);
}
.kw-hot:hover .bi-fire{ color:#fff; }

.kw-hot-label{
  display:inline-flex;align-items:center;gap:.25rem;
  color:var(--accent-2);font-weight:600;
}
.kw-hot-label i{ color:var(--accent); }

/* Stagger the float animation across badges so they don't move in lockstep.
   Each :nth-child gets a different delay + duration + amplitude. */
.kw:nth-child(3n+1){ --kw-delay: -0.0s; --kw-dur: 4.2s; --kw-amp: 5px; }
.kw:nth-child(3n+2){ --kw-delay: -1.4s; --kw-dur: 5.0s; --kw-amp: 7px; }
.kw:nth-child(3n+3){ --kw-delay: -2.6s; --kw-dur: 4.6s; --kw-amp: 6px; }
.kw:nth-child(5n+1){ --kw-dur: 5.4s; }
.kw:nth-child(7n+1){ --kw-dur: 3.8s; --kw-amp: 4px; }

@keyframes kw-float{
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(calc(var(--kw-amp) * -1)); }
}

/* Honor reduced-motion preferences */
@media (prefers-reduced-motion: reduce){
  .kw{ animation: none; }
  .kw:hover{ transform: none; }
}

section[id]{scroll-margin-top:80px}
::selection{background:var(--accent);color:#fff}

/* =====================================================
   LANGUAGE SWITCHER (navbar dropdown + footer row)
   ===================================================== */
.flag{
  flex:none;display:inline-block;width:20px;height:15px;
  border-radius:3px;object-fit:cover;
  box-shadow:0 0 0 1px rgba(15,23,42,.10);
}
.navbar .lang-menu{min-width:190px}
.navbar .lang-current{font-weight:600;letter-spacing:.02em}
/* The language menu and the longer translated labels need more room than the bar had.
   On mid-size screens the bar gets tighter (smaller text, no icons) so it stays on one line,
   and if it ever does not fit it wraps instead of pushing the page wider. */
@media (min-width:992px){
  .navbar-expand-lg .navbar-nav{flex-wrap:wrap;justify-content:flex-end}
  .navbar .nav-link{white-space:nowrap}
}
@media (min-width:992px) and (max-width:1399.98px){
  html:not([lang="en"]) .navbar .navbar-nav>.nav-item>.nav-link{font-size:.86rem;padding:.45rem .55rem!important}
  html:not([lang="en"]) .navbar .navbar-nav>.nav-item>.nav-link>i:not(.bi-globe){display:none}
  html:not([lang="en"]) .navbar-brand{margin-right:.5rem}
}
@media (min-width:992px) and (max-width:1199.98px){
  .navbar .navbar-nav>.nav-item>.nav-link{font-size:.84rem;padding:.45rem .5rem!important}
  .navbar .navbar-nav>.nav-item>.nav-link>i:not(.bi-globe){display:none}
  .navbar-brand{margin-right:.5rem}
  html:not([lang="en"]) .navbar .navbar-nav>.nav-item>.nav-link{font-size:.8rem;padding:.4rem .4rem!important}
}
.footer-langs{
  margin-top:2.4rem;padding-top:1.5rem;
  border-top:1px solid var(--border);
  display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1.4rem;
}
.footer-langs + .footer-bottom{margin-top:1.5rem}
.footer-langs-label{
  display:inline-flex;align-items:center;gap:.4rem;
  font-size:.82rem;font-weight:700;text-transform:uppercase;letter-spacing:.14em;
  color:var(--text);
}
.footer-langs ul{display:flex;flex-wrap:wrap;gap:.45rem 1.25rem}
.footer-langs ul li{margin:0}
.footer-langs ul li a{display:inline-flex;align-items:center;gap:.45rem}
.footer-langs ul li a[aria-current]{color:var(--text);font-weight:600}
.footer-pdf a{color:var(--accent-2);font-weight:600;text-decoration:none}
.footer-pdf a:hover{text-decoration:underline}

/* =====================================================
   CONTACT WINDOW (footer "Contact" link)
   ===================================================== */
.contact-modal{
  /* a modal <dialog> is centered by the browser; these rules cover the look
     and the fallback when it is opened without showModal() */
  position:fixed;inset:0;margin:auto;
  width:calc(100% - 2rem);max-width:480px;height:fit-content;
  max-height:calc(100vh - 2rem);max-height:calc(100dvh - 2rem);overflow:auto;
  padding:2.2rem 1.8rem 1.8rem;
  border:1px solid var(--border);border-radius:18px;
  background:var(--bg-1);color:var(--text);
  box-shadow:0 30px 80px rgba(15,23,42,.28);
  text-align:center;z-index:2000;
}
.contact-modal:not([open]){display:none}
.contact-modal::backdrop{
  background:rgba(15,23,42,.55);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
}
.contact-modal[open]{animation:contact-in .18s ease-out}
@keyframes contact-in{
  from{opacity:0;transform:translateY(10px) scale(.98)}
  to{opacity:1;transform:none}
}
.contact-modal-icon{
  display:grid;place-items:center;
  width:52px;height:52px;margin:0 auto 1rem;border-radius:14px;
  background:var(--accent-soft);color:var(--accent-2);font-size:1.5rem;
}
.contact-modal h2{font-size:1.5rem;margin-bottom:.8rem}
.contact-modal p{font-size:.96rem;line-height:1.6;margin:0 0 1.2rem;text-wrap:pretty}
.contact-modal-email{
  display:block;max-width:100%;height:auto;margin:0 auto 1.4rem;
  padding:.7rem 1rem;box-sizing:content-box;
  background:var(--bg-2);border:1px dashed var(--border-strong);border-radius:12px;
  -webkit-user-drag:none;
}
.contact-modal-ok{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:120px;padding:.65rem 1.4rem;
  border:0;border-radius:10px;cursor:pointer;
  background:var(--text);color:#fff;font:inherit;font-weight:600;
  transition:background .15s ease;
}
.contact-modal-ok:hover{background:var(--accent-2)}
.contact-modal-close{
  position:absolute;top:.7rem;right:.7rem;
  display:grid;place-items:center;width:34px;height:34px;
  border:0;border-radius:8px;cursor:pointer;
  background:transparent;color:var(--text-mute);
  transition:background .15s ease,color .15s ease;
}
.contact-modal-close:hover{background:var(--bg-2);color:var(--text)}
.contact-modal-ok:focus-visible,
.contact-modal-close:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion: reduce){
  .contact-modal[open]{animation:none}
}
