/* ----------------------------------------------------------------------
   Self-hosted fonts (v50).
   Until v49 these two families were pulled from fonts.googleapis.com on
   every page. That cost a render-blocking third-party stylesheet plus two
   extra DNS+TLS handshakes before any text could paint, sent every
   visitor's IP to Google on a site whose whole claim is that nothing
   leaves the device, and could never be cached by the service worker
   (LIB_HOSTS only covers jsDelivr and opencv), so offline pages fell back
   to system fonts.
   These are the variable (200-800) latin builds, so one file covers every
   weight the site uses. unicode-range means latin-ext is only fetched by
   visitors who actually need an accented glyph.
   Filenames are versioned: /assets/* is immutable for a year in _headers.
   ---------------------------------------------------------------------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/fonts/plus-jakarta-sans-latin-v1.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/fonts/plus-jakarta-sans-latin-ext-v1.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/assets/fonts/sora-latin-v1.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/assets/fonts/sora-latin-ext-v1.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ==========================================================================
   instanets.com — shared design system
   Private, local-first browser tools. Light, premium, metallic UI.
   One stylesheet, self-hosted, no external CSS dependencies.
   ========================================================================== */

:root{
  /* base palette */
  --bg:#f3f4f8; --bg-2:#eceef5; --surface:#ffffff; --surface-2:#fbfbfe;
  --ink:#0d1020; --ink-2:#39405a; --muted:#697089; --line:#e6e8f1; --line-2:#d7dae7;

  /* brand accent (default / neutral) */
  --accent:#c0392b; --accent-d:#96271b; --accent-2:#e8705f; --accent-soft:#fdeeec;

  /* per-cluster accents (set on <body data-cluster="…">) */
  --c-pdf:#2b6ef5;      --c-pdf-soft:#e8f0ff;
  --c-ecom:#4a45cf;     --c-ecom-soft:#eeedfd;
  --c-image:#0891b2;    --c-image-soft:#e0f5fb;
  --c-dev:#0f766e;      --c-dev-soft:#dcf5f1;
  --c-seo:#b45309;      --c-seo-soft:#fbeedd;
  --c-creator:#c026d3;  --c-creator-soft:#fbe6fe;
  --c-text:#3f6212;     --c-text-soft:#edf6dd;

  --radius:16px; --radius-lg:22px;
  --shadow:0 10px 30px -14px rgba(15,18,40,.20);
  --shadow-lg:0 30px 60px -22px rgba(15,18,40,.30);
  --chrome:linear-gradient(135deg,#ffffff 0%,#dfe3ee 40%,#f6f8fc 62%,#c9ceda 100%);
  --ok:#1a9d63; --warn:#b45309; --err:#c22d3e;
  --ring:0 0 0 3px rgba(91,87,224,.28);
}

/* cluster accent binding */
body[data-cluster="pdf"]{--accent:var(--c-pdf);--accent-d:#1d54cc;--accent-2:#6ba6ff;--accent-soft:var(--c-pdf-soft)}
body[data-cluster="ecommerce"]{--accent:var(--c-ecom);--accent-d:#3d38bd;--accent-2:#837ffb;--accent-soft:var(--c-ecom-soft)}
body[data-cluster="image"]{--accent:var(--c-image);--accent-d:#0b7594;--accent-2:#22b8d6;--accent-soft:var(--c-image-soft)}
body[data-cluster="developer"]{--accent:var(--c-dev);--accent-d:#0b5f58;--accent-2:#16a394;--accent-soft:var(--c-dev-soft)}
body[data-cluster="seo"]{--accent:var(--c-seo);--accent-d:#8f4207;--accent-2:#ea9a3e;--accent-soft:var(--c-seo-soft)}
body[data-cluster="creator"]{--accent:var(--c-creator);--accent-d:#a21caf;--accent-2:#e05bef;--accent-soft:var(--c-creator-soft)}
body[data-cluster="text"]{--accent:var(--c-text);--accent-d:#334e0e;--accent-2:#5f8f1e;--accent-soft:var(--c-text-soft)}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:'Plus Jakarta Sans',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--ink);line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden}
h1,h2,h3,h4,.display{font-family:'Sora','Plus Jakarta Sans',sans-serif;line-height:1.15;letter-spacing:-.02em}
a{color:inherit;text-decoration:none}
img,svg{max-width:100%}
:focus-visible{outline:none;box-shadow:var(--ring);border-radius:8px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.skip{position:absolute;left:-999px;top:8px;z-index:100;background:#fff;padding:10px 16px;border-radius:10px;box-shadow:var(--shadow)}
.skip:focus{left:12px}

.wrap{width:100%;max-width:1180px;margin:0 auto;padding:0 22px}
.wrap-narrow{max-width:900px}
.gradient-text{background:linear-gradient(100deg,var(--accent-2),var(--accent),var(--accent-d));-webkit-background-clip:text;background-clip:text;color:transparent}
.eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-d);background:var(--accent-soft);padding:7px 14px;border-radius:999px;border:1px solid color-mix(in srgb,var(--accent) 22%,white)}

/* ---------- header ---------- */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.72);backdrop-filter:saturate(180%) blur(16px);-webkit-backdrop-filter:saturate(180%) blur(16px);border-bottom:1px solid var(--line)}
.nav{display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
.brand{display:flex;align-items:center;gap:11px;font-family:'Sora';font-weight:800;font-size:19px;letter-spacing:-.02em;flex:none}
/* ----------------------------------------------------------------------
   Wordmark: insta + NET + s.com.
   Deliberately a FIXED colour, not var(--accent). The accent is remapped per
   cluster (blue on PDF, purple on e-commerce, teal on image), so using it
   here would make the brand change colour from page to page — which is the
   opposite of what a wordmark is for.
   #c0392b on white measures 5.44:1, comfortably past AA. The dark footer
   needs a lighter tone: #e8705f on the footer background measures 6.13:1.
   ---------------------------------------------------------------------- */
.wm-net{color:#c0392b}
.f-brand .wm-net,.footer-bottom .wm-net{color:#e8705f}

.brand-tag{font-size:13px;font-weight:600;color:var(--muted);letter-spacing:0;white-space:nowrap;padding-left:14px;margin-right:auto;border-left:1px solid var(--line)}
.brand-tag b{font-weight:800;color:var(--ink-2)}
@media(max-width:1120px){.brand-tag{display:none}}
.brand .mark{width:32px;height:32px;background:none;border:0;box-shadow:none;display:grid;place-items:center}
.brand .mark svg{width:32px;height:32px}
/* Sits right beside the logo, so it must stay neutral — it used to inherit
   the cluster accent, which is why e-commerce and creator pages showed a
   pale purple pill next to the brand. */
.niche-badge{font-size:12px;font-weight:700;color:var(--accent-d);background:var(--accent-soft);padding:5px 11px;border-radius:999px;border:1px solid color-mix(in srgb,var(--accent) 25%,white);white-space:nowrap}
.nav-links{display:flex;align-items:center;gap:4px}
.nav-links a{white-space:nowrap;font-size:14px;font-weight:600;color:var(--ink-2);padding:9px 12px;border-radius:10px;transition:.16s}
.nav-links a:hover{color:var(--ink);background:#eef0f6}
.nav-links a[aria-current]{color:var(--accent-d);background:var(--accent-soft)}
.nav-toggle{display:none;background:none;border:1px solid var(--line);border-radius:10px;width:42px;height:42px;cursor:pointer;place-items:center}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:700;font-size:14.5px;border-radius:12px;padding:12px 20px;cursor:pointer;border:1px solid transparent;transition:.18s;white-space:nowrap;font-family:inherit;text-align:center}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none!important}
.btn-primary{background:linear-gradient(135deg,var(--accent-2),var(--accent-d));color:#fff;box-shadow:0 10px 24px -12px color-mix(in srgb,var(--accent) 80%,black),inset 0 1px 0 rgba(255,255,255,.35)}
.btn-primary:hover{transform:translateY(-2px)}
.btn-ghost{background:#fff;color:var(--ink);border-color:var(--line-2)}
.btn-ghost:hover{border-color:#c2c6d6;background:#fbfbfe}
.btn-sm{padding:9px 15px;font-size:13.5px}
.btn-block{width:100%}

/* ---------- privacy strip ---------- */
.privacy-strip{background:linear-gradient(100deg,#0a2028,#12454f);color:#fff;text-align:center;padding:9px 16px;font-size:13px}
.privacy-strip b{color:#b9b6ff}

/* ---------- breadcrumb ---------- */
.breadcrumb{font-size:13px;color:var(--muted);padding:18px 0 0;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.breadcrumb a:hover{color:var(--accent-d)}
.breadcrumb .sep{opacity:.5}

/* ---------- tool head ---------- */
.tool-head{padding:26px 0 4px}
.tool-head h1{font-size:clamp(1.9rem,4.4vw,2.7rem);font-weight:800;margin-top:8px}
.tool-head p.sub{color:var(--muted);font-size:1.05rem;max-width:72ch;margin-top:10px}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.chip{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:700;color:var(--accent-d);background:var(--accent-soft);padding:6px 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--accent) 20%,white)}

/* ---------- panels / cards ---------- */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:24px;margin-top:22px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px}

/* ---------- form controls ---------- */
.field label,.control-label{display:block;font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-2);margin-bottom:9px}
select,input[type=text],input[type=number],input[type=search],input[type=email],input[type=url],input[type=tel],textarea{font-family:inherit;font-size:16px;padding:11px 13px;border-radius:11px;border:1px solid var(--line-2);background:#fff;color:var(--ink);width:100%}
select:focus,input:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:var(--ring)}
input[type=range]{width:100%;accent-color:var(--accent-d)}
input[type=color]{height:44px;padding:5px;border-radius:11px;border:1px solid var(--line-2);width:100%;background:#fff}
.range-row{display:flex;align-items:center;gap:12px}
.range-row b{min-width:48px;text-align:right;font-variant-numeric:tabular-nums;color:var(--accent-d)}
.check{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:600;color:var(--ink-2);cursor:pointer}
.check input{width:18px;height:18px;accent-color:var(--accent-d)}
.hint{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5}
.controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px;align-items:end}
.seg{display:inline-flex;gap:6px;flex-wrap:wrap}
.seg button{font-family:inherit;font-size:13.5px;font-weight:700;padding:9px 13px;border-radius:10px;border:1px solid var(--line-2);background:#fff;color:var(--ink-2);cursor:pointer;transition:.15s}
.seg button:hover{border-color:#c2c6d6}
.seg button[aria-pressed="true"]{background:linear-gradient(135deg,var(--accent-2),var(--accent-d));color:#fff;border-color:transparent;box-shadow:0 6px 14px -8px color-mix(in srgb,var(--accent) 80%,black)}
.toolbar{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}

/* ---------- dropzone ---------- */
.dropzone{border:2px dashed var(--line-2);border-radius:16px;padding:44px 22px;text-align:center;cursor:pointer;transition:.2s;background:var(--surface-2);margin-top:6px}
.dropzone:hover,.dropzone.drag{border-color:var(--accent);background:var(--accent-soft)}
.dropzone .di{width:56px;height:56px;border-radius:16px;background:linear-gradient(135deg,#fff,var(--accent-soft));box-shadow:inset 0 1px 0 #fff,0 8px 18px -10px color-mix(in srgb,var(--accent) 50%,white);display:grid;place-items:center;color:var(--accent-d);margin:0 auto 16px}
.dropzone b{font-size:1.08rem}
.dropzone span{display:block;color:var(--muted);font-size:14px;margin-top:5px}

/* ---------- file grid / queue ---------- */
.checker-bg{background-color:#fff;background-image:linear-gradient(45deg,#eef0f6 25%,transparent 25%),linear-gradient(-45deg,#eef0f6 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eef0f6 75%),linear-gradient(-45deg,transparent 75%,#eef0f6 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}
.stats{display:flex;gap:20px;flex-wrap:wrap;margin:22px 0 4px;font-size:13.5px;color:var(--muted)}
.stats b{color:var(--ink)}
.stats .ok{color:var(--ok);font-weight:800}
.file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;margin-top:16px}
.file-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;display:flex;flex-direction:column}
.file-card .thumb{aspect-ratio:1;display:grid;place-items:center;position:relative;overflow:hidden}
.file-card .thumb img{max-width:100%;max-height:100%;object-fit:contain}
.file-card .badge{position:absolute;top:8px;left:8px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;background:color-mix(in srgb,var(--accent) 88%,black);color:#fff;padding:3px 8px;border-radius:7px}
.file-card .badge.neutral{background:rgba(105,112,137,.92)}
.file-card .badge.ok{background:rgba(26,157,99,.92)}
.file-card .body{padding:9px 11px}
.file-card .name{font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-card .dim{font-size:11.5px;color:var(--muted)}
.file-card .acts{display:flex;gap:6px;padding:0 9px 10px}
.mini{font-family:inherit;font-size:11.5px;font-weight:700;padding:6px 8px;border-radius:8px;border:1px solid var(--line-2);background:#fff;color:var(--ink-2);cursor:pointer;transition:.15s;flex:1}
.mini:hover{background:#f2f3f8;color:var(--ink)}
.mini:disabled{opacity:.4;cursor:not-allowed}
.mini.danger{color:#b23b3b;border-color:#f0d4d4}.mini.danger:hover{background:#fdf3f3}
.empty{text-align:center;color:var(--muted);padding:30px;font-size:14.5px}

/* ---------- progress ---------- */
.pbar{height:8px;background:var(--bg-2);border-radius:99px;overflow:hidden}
.pbar>div{height:100%;width:0;background:linear-gradient(90deg,var(--accent-2),var(--accent-d));transition:.2s}
.spin{width:16px;height:16px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:sp .7s linear infinite;display:inline-block}
.spin-dark{width:20px;height:20px;border:3px solid var(--accent-soft);border-top-color:var(--accent-d);border-radius:50%;animation:sp .7s linear infinite;display:inline-block}
@keyframes sp{to{transform:rotate(360deg)}}

/* ---------- notice boxes ---------- */
.notice{font-size:13.5px;line-height:1.6;border-radius:12px;padding:13px 15px;margin-top:16px;display:flex;gap:11px;align-items:flex-start;border:1px solid}
.notice svg{flex:none;margin-top:1px}
.notice.info{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 22%,white);color:var(--ink-2)}
.notice.info svg{color:var(--accent-d)}
.notice.warn{background:#fbf3e6;border-color:#f0dcbb;color:#5a4620}.notice.warn svg{color:var(--warn)}
.notice a{color:var(--accent-d);font-weight:700;text-decoration:underline}
.beta-tag{display:inline-block;font-size:10.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#fff;background:var(--warn);padding:3px 8px;border-radius:6px;vertical-align:middle;margin-left:8px}

/* ---------- sections ---------- */
.section{padding:54px 0}
.section-head{text-align:center;max-width:680px;margin:0 auto 38px}
.section-head h2{font-size:clamp(1.6rem,3.4vw,2.3rem);font-weight:800;margin-top:12px}
.section-head p{color:var(--muted);margin-top:12px}
.feat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.feat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow)}
.feat .fi{width:44px;height:44px;border-radius:12px;background:var(--accent-soft);display:grid;place-items:center;color:var(--accent-d);margin-bottom:14px}
.feat h3{font-size:1.05rem;margin-bottom:6px}
.feat p{color:var(--muted);font-size:14px}
.steps{counter-reset:s}
.steps .fi{background:linear-gradient(135deg,#fff,var(--accent-soft));box-shadow:inset 0 1px 0 #fff,0 8px 18px -10px color-mix(in srgb,var(--accent) 50%,white);font-family:'Sora';font-weight:800;color:var(--accent-d)}
.steps .step .fi::before{counter-increment:s;content:counter(s)}

/* ---------- tool cards (hub grids) ---------- */
.tools-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px}
.tool-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:24px;box-shadow:var(--shadow);transition:.22s;position:relative;overflow:hidden;display:flex;flex-direction:column}
.tool-card::before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,var(--accent-2),var(--accent-d));opacity:0;transition:.22s}
.tool-card:hover{transform:translateY(-6px);box-shadow:var(--shadow-lg);border-color:color-mix(in srgb,var(--accent) 30%,white)}
.tool-card:hover::before{opacity:1}
.tool-card .ico{width:50px;height:50px;border-radius:14px;background:linear-gradient(135deg,var(--accent-soft),#fff);border:1px solid color-mix(in srgb,var(--accent) 18%,white);display:grid;place-items:center;color:var(--accent-d);margin-bottom:16px}
.tool-card .ico svg{width:25px;height:25px}
.tool-card h3{font-size:1.15rem;font-weight:700;margin-bottom:7px}
.tool-card p{color:var(--muted);font-size:14px;flex:1}
.tool-card .go{margin-top:16px;display:inline-flex;align-items:center;gap:8px;font-weight:700;color:var(--accent-d);font-size:14px}
.tool-card .go svg{width:16px;height:16px;transition:.2s}
.tool-card:hover .go svg{transform:translateX(4px)}
.tool-card.soon{opacity:.92}
.tool-card.soon .ico{color:#8a90a6;background:linear-gradient(135deg,#eef0f6,#fff);border-color:var(--line)}
.pill-soon{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#8a90a6;background:#f0f1f6;padding:4px 10px;border-radius:999px}
.pill-live{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--ok);background:rgba(26,157,99,.1);padding:4px 10px;border-radius:999px}
.pill-beta{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--warn);background:#fbf1e2;padding:4px 10px;border-radius:999px}

/* ---------- related ---------- */
.rel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.rel-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:16px;box-shadow:var(--shadow);transition:.2s;display:flex;gap:12px;align-items:center}
.rel-card:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--accent) 30%,white);box-shadow:var(--shadow-lg)}
.rel-card .ri{width:40px;height:40px;border-radius:11px;background:var(--accent-soft);display:grid;place-items:center;color:var(--accent-d);flex:none}
.rel-card b{font-size:14px}
.rel-card span{font-size:12px;color:var(--muted);display:block}

/* ---------- FAQ ---------- */
.faq{max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.faq details{background:#fff;border:1px solid var(--line);border-radius:13px;padding:4px 20px;box-shadow:var(--shadow)}
.faq summary{cursor:pointer;font-weight:700;font-size:1rem;padding:14px 0;list-style:none;display:flex;justify-content:space-between;gap:14px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";font-size:1.4rem;color:var(--accent-d);line-height:1}
.faq details[open] summary::after{content:"\2013"}
.faq p{color:var(--muted);padding:0 0 15px;font-size:14.5px}

/* ---------- toast / dialog ---------- */
.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%) translateY(20px);background:#0d1020;color:#fff;padding:13px 20px;border-radius:12px;font-size:14px;font-weight:600;box-shadow:var(--shadow-lg);opacity:0;pointer-events:none;transition:.3s;z-index:300;max-width:92vw}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast[data-kind="error"]{background:#7a1f2a}
.toast[data-kind="success"]{background:#0e5a38}
.modal{position:fixed;inset:0;background:rgba(9,11,24,.62);backdrop-filter:blur(4px);display:none;z-index:200;align-items:center;justify-content:center;padding:18px}
.modal.open{display:flex}
.modal-card{background:#fff;border-radius:18px;max-width:760px;width:100%;max-height:94vh;overflow:auto;box-shadow:var(--shadow-lg)}
.modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--line)}
.modal-head h3{font-size:1.05rem}
.modal-body{padding:18px 20px}
.modal-foot{display:flex;justify-content:flex-end;gap:10px;padding:16px 20px;border-top:1px solid var(--line)}

/* ---------- footer ---------- */
.site-footer{background:#08222a;color:#a7c0c7;padding:54px 0 26px;margin-top:30px}
.footer-grid{display:grid;grid-template-columns:1.7fr 1fr 1fr 1fr;gap:32px}
.footer-grid h4{color:#fff;font-family:'Sora';font-size:.9rem;letter-spacing:.04em;text-transform:uppercase;margin-bottom:15px}
.footer-grid a{display:block;color:#aeb4cc;font-size:14px;padding:5px 0;transition:.15s}
.footer-grid a:hover{color:#fff}
.f-brand{display:flex;align-items:center;gap:11px;margin-bottom:13px}
.f-brand .mark{width:34px;height:34px;border-radius:9px;background:#fff;display:grid;place-items:center;padding:3px}
.f-brand .mark svg{width:28px;height:28px}
.f-brand b{font-family:'Sora';font-size:18px;color:#fff}
.footer-grid p{font-size:13.8px;line-height:1.7;color:#aeb4cc}
.privacy-note{margin-top:24px;padding:16px 18px;border:1px solid #212540;border-radius:14px;background:#0f1220;display:flex;gap:12px;align-items:flex-start}
.privacy-note svg{width:22px;height:22px;color:#63cdd4;flex:none;margin-top:1px}
.privacy-note span{font-size:13.3px;color:#c6cae0}
.footer-bottom{border-top:1px solid #1b1f36;margin-top:36px;padding-top:22px;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;font-size:13px;color:#7c829c}
.footer-bottom a{color:#9aa0bd}.footer-bottom a:hover{color:#fff}

/* ---------- reveal animation (respects reduced motion) ---------- */
.reveal{opacity:0;transform:translateY(22px);transition:.7s cubic-bezier(.2,.7,.2,1)}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
  .reveal{opacity:1;transform:none}
}

/* ---------- responsive ---------- */
@media(max-width:860px){
  .nav-links{position:absolute;top:64px;left:0;right:0;background:#fff;border-bottom:1px solid var(--line);flex-direction:column;align-items:stretch;padding:12px 16px;gap:2px;display:none;box-shadow:var(--shadow)}
  .nav-links.open{display:flex}
  .nav-links a{white-space:nowrap;padding:13px 14px}
  .nav-toggle{display:grid}
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:520px){
  .niche-badge{display:none}
  .footer-grid{grid-template-columns:1fr}
  .section{padding:44px 0}
  .toolbar .btn{width:100%}
}

.mark img{width:100%;height:100%;object-fit:contain;display:block}

/* ============================================================
   SITE-WIDE DESIGN PASS
   Mobile polish · touch targets · empty / loading / error states
   Added as one layer so every tool inherits it consistently.
   ============================================================ */

/* ---- 1. Never allow horizontal scroll ---- */
html{overflow-x:hidden}
img,canvas,video,svg,table,pre{max-width:100%}
canvas{height:auto}
.wrap{width:100%}

/* ---- 2. Standard state blocks (empty / loading / error / success) ---- */
.state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  text-align:center;padding:38px 22px;border-radius:14px;border:1px dashed var(--line-2);
  background:var(--surface-2);color:var(--muted);font-size:14px}
.state .state-ico{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;
  background:var(--accent-soft);color:var(--accent-d);font-size:20px}
.state b{color:var(--ink);font-size:15px;font-weight:700}
.state p{margin:0;max-width:42ch;line-height:1.55}
.state--error{border-style:solid;border-color:#f0d4d4;background:#fdf3f3;color:#a33}
.state--error .state-ico{background:#fbe3e3;color:#a33}
.state--busy{border-style:solid;border-color:var(--line);background:#fff}

/* Inline status line — consistent across tools */
.state-line{display:none;align-items:center;gap:9px;padding:11px 14px;border-radius:11px;
  font-size:13.5px;font-weight:600;margin-top:12px;line-height:1.45}
.state-line.show{display:flex}
.state-line.is-busy{background:#fff8e6;color:#8a5a00;border:1px solid #ffe2a1}
.state-line.is-ok{background:#eefaf0;color:#1c6b34;border:1px solid #bfe6c9}
.state-line.is-error{background:#fdf3f3;color:#a33;border:1px solid #f0d4d4}

/* Shared spinner (several tools defined their own; this unifies them) */
.spin{display:inline-block;width:14px;height:14px;border:2px solid rgba(0,0,0,.15);
  border-top-color:currentColor;border-radius:50%;animation:spin .7s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}

/* Skeleton shimmer for content that is loading */
.skeleton{background:linear-gradient(90deg,var(--bg-2) 25%,#f6f7fb 50%,var(--bg-2) 75%);
  background-size:200% 100%;animation:shimmer 1.3s infinite;border-radius:8px;color:transparent}
@keyframes shimmer{to{background-position:-200% 0}}

/* Busy state on any button: dim + block clicks, keep size stable */
.btn[aria-busy="true"],.btn:disabled{pointer-events:none}

/* ---- 3. Touch targets: 44px minimum on touch devices ---- */
@media (hover:none) and (pointer:coarse){
  .btn{min-height:46px}
  .btn-sm{min-height:42px}
  .mini{min-height:40px;font-size:12.5px;padding:9px 10px}
  .tool-btn{min-height:42px}
  .seg button{min-height:44px}
  .nav-links a{min-height:46px;display:flex;align-items:center}
  input[type=checkbox],.check input{width:22px;height:22px}
  input[type=range]{height:34px}
  select,input[type=text],input[type=number],input[type=search],input[type=email]{min-height:46px}
  .faq summary{min-height:48px;display:flex;align-items:center}
  /* Remove hover-lift on touch — it sticks after tapping */
  .btn-primary:hover,.tool-card:hover{transform:none}
}

/* iOS zooms the page when a focused input is under 16px.
   The base rule above is already 16px and uses attribute selectors, which
   outrank a bare `input` selector no matter what media query wraps it.
   This block is kept as a floor for any input type not listed above. */
@media(max-width:860px){
  input,select,textarea{font-size:16px}
}

/* ---- 4. Mobile layout polish ---- */
@media(max-width:860px){
  .tool-head{padding:18px 0 4px}
  .tool-head p.sub{font-size:.98rem}
  .panel{padding:16px}
  .controls{grid-template-columns:1fr!important;gap:12px}
  .toolbar{flex-wrap:wrap;gap:8px}
  .dropzone{padding:26px 16px}
  .feat-grid,.tools-grid{grid-template-columns:1fr!important}
  /* wide tables scroll instead of breaking the page */
  .compare-table{display:block;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}
  .compare-table th:first-child{width:auto}
  .studio-layout,.studio-grid{grid-template-columns:1fr!important}
  .verdict-row{grid-template-columns:1fr!important}
}

@media(max-width:520px){
  .wrap{padding-left:16px;padding-right:16px}
  .tool-head h1{font-size:clamp(1.55rem,7vw,2rem)}
  .chips{gap:6px}
  .chip{font-size:11.5px;padding:5px 10px}
  .breadcrumb{font-size:12px}
  .privacy-strip{font-size:12px;padding:8px 14px;line-height:1.4}
  .toolbar .btn,.toolbar .btn-sm{width:100%}
  .state{padding:28px 16px}
  .file-grid{grid-template-columns:repeat(auto-fill,minmax(112px,1fr))!important}
  .footer-grid{gap:22px}
  /* stacked label + control reads better than cramped side-by-side */
  .controls-row{flex-direction:column;align-items:stretch;gap:6px}
  .controls-row label{margin-bottom:0}
}

/* ---- 5. Focus visibility (keyboard + accessibility) ---- */
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid var(--accent-d);outline-offset:2px;border-radius:6px}

/* ---- 6. Brand alignment: privacy strip followed the old teal ---- */
.privacy-strip{background:linear-gradient(100deg,#2a1210,#5e2018)}
.privacy-strip b{color:#ffc9c0}

/* ---- 7. Respect reduced motion for the new animations ---- */
@media (prefers-reduced-motion:reduce){
  .spin,.skeleton{animation:none}
  .skeleton{background:var(--bg-2)}
}

/* ---- 8. Studio layouts on mobile ----
   The four studios cap their control panel at 400px with internal scrolling.
   On a phone that creates a nested scroll region that steals the swipe.
   Let the panel size naturally and scroll with the page instead. */
@media(max-width:960px){
  .tool-panel{max-height:none!important;overflow:visible!important;position:static!important}
  .studio-layout{gap:16px}
  .canvas-wrap,.preview-wrap{max-height:56vh}
  .canvas-wrap canvas,.preview-wrap canvas{max-height:56vh;object-fit:contain}
}

/* ---- 9. Sticky action bar on phones ----
   The primary action often sits far below the fold on long tool pages. */
@media(max-width:640px){
  .toolbar.sticky-actions{position:sticky;bottom:0;z-index:20;
    background:color-mix(in srgb,var(--bg) 92%,transparent);
    backdrop-filter:blur(8px);padding:10px 0;
    border-top:1px solid var(--line);margin-top:16px}
}

/* ---- 10. Long file names must not blow out layouts ---- */
.file-card .name,.file-name,.item .nm,.stats b{overflow-wrap:anywhere}

/* ---- 11. Dropzone reads as interactive on touch ---- */
.dropzone{cursor:pointer;transition:border-color .15s,background .15s}
.dropzone:focus-visible{border-color:var(--accent);background:var(--accent-soft)}


/* ---- 12. `hidden` must actually hide ----
   The hidden attribute resolves to a user-agent `display:none`, which loses
   to any class rule that sets display (e.g. .compact-row{display:flex}).
   That is why two gated panels in PDF Studio stayed on screen while a third,
   which had no display rule, hid correctly. Make the attribute authoritative. */
[hidden]{display:none!important}


/* ---- 13. Studio panel: the tick row ----
   Shared component. Every collapsible section in a Studio is one line where
   the checkbox IS the heading — `☐ Feature name ▾`. Ticking it reveals that
   feature's settings and nothing else. Previously this lived inline in two
   pages, in two incompatible flavours (.sec-tick and .sec-toggle), and two
   Studios had neither. One definition now, used by all four.

   Markup:
     <div class="tool-section">
       <label class="sec-tick">
         <input type="checkbox" data-panel="fooOpts"><b>Feature name</b>
         <span class="chev" aria-hidden="true">▾</span>
       </label>
       <div class="feature-opts" id="fooOpts" hidden> …settings… </div>
     </div>

   A section with no checkbox (always-on, e.g. an export format picker) uses
   `.sec-tick.is-static` — same type, no tick, no chevron, cannot collapse. */

.sec-tick,.sec-toggle{
  display:flex;align-items:center;gap:8px;cursor:pointer;
  font-size:13px;padding:7px 0;user-select:none;
  min-height:38px;margin-bottom:0;line-height:1.3}
.sec-tick input[type=checkbox],.sec-toggle input[type=checkbox]{
  accent-color:var(--accent-d);width:16px;height:16px;flex:none;margin:0;cursor:pointer}
.sec-tick b,.sec-toggle b{font-weight:700;color:var(--ink);flex:1}
.sec-tick .chev,.sec-toggle .chev{color:var(--muted);font-size:11px;flex:none;transition:transform .18s}
.sec-tick input:checked ~ .chev,.sec-toggle input:checked ~ .chev{transform:rotate(180deg)}
.sec-tick input:focus-visible,.sec-toggle input:focus-visible{outline:none;box-shadow:var(--ring)}
.sec-tick:hover b,.sec-toggle:hover b{color:var(--accent-d)}

/* An open section is tinted so it is obvious which one you are editing. */
.sec-tick.is-open,.sec-toggle.is-open{
  background:var(--accent-soft);border-radius:8px;padding-left:8px;padding-right:8px;
  margin-left:-8px;margin-right:-8px}

/* Static heading — looks like a tick row, has no tick. */
.sec-tick.is-static{cursor:default}
.sec-tick.is-static:hover b{color:var(--ink)}

.feature-opts{margin-top:9px;padding-left:24px;border-left:2px solid var(--accent-soft)}
.feature-opts > :first-child{margin-top:0}

/* One line at the top of a panel telling you how the panel works. */
.panel-hint{font-size:11.5px;color:var(--muted);line-height:1.5;margin:0 0 10px;
  padding-bottom:10px;border-bottom:1px solid var(--line)}
/* Explanatory note under a control. */
.mini-note{font-size:11px;color:var(--muted);margin-top:6px;line-height:1.5}

/* Touch targets: the row is the hit area, so give it room on a phone. */
@media(max-width:640px){
  .sec-tick,.sec-toggle{min-height:44px;font-size:14px}
  .sec-tick input[type=checkbox],.sec-toggle input[type=checkbox]{width:18px;height:18px}
  .feature-opts{padding-left:14px}
}

/* ---- 14. Brush ring overlay ----
   The brush size used to be shown with a CSS custom cursor. Touch screens have
   no cursor, so on a phone the brush had no size feedback at all, and the ring
   was capped at 90px so it lied about large brushes. It is now drawn on a
   canvas layered over the image, which works for both mouse and finger. */
.canvas-holder{position:relative;display:inline-block;line-height:0;max-width:100%}
.brush-ring{position:absolute;inset:0;pointer-events:none;z-index:3;
  opacity:0;transition:opacity .12s}
.brush-ring.on{opacity:1}
.brush-swatch{display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;flex:none;border:1px solid var(--line-2);border-radius:8px;
  background:repeating-conic-gradient(#eef0f6 0 25%,#fff 0 50%) 0 0/10px 10px}
.brush-swatch i{display:block;border-radius:50%;background:var(--ink);opacity:.72}


/* ---- 15. Shelf cards ----
   The install offer and the email signup. Both appear only inside a "your
   file is ready" block, never as an overlay — the rule for this site is
   that nothing interrupts the work. No modal, no blur, no exit prompt: a
   visitor is asked once, after they already have what they came for, and
   ignoring it costs them nothing. */
.shelf-card{display:flex;align-items:flex-start;gap:14px;flex-wrap:wrap;
  border:1px solid var(--line);border-left:3px solid var(--accent);
  border-radius:12px;padding:14px 16px;background:var(--surface-2);margin-top:14px}
.shelf-body{flex:1 1 240px;min-width:0}
.shelf-title{display:block;font-size:13.5px;color:var(--ink);margin-bottom:4px}
.shelf-text{font-size:12.5px;color:var(--ink-2);line-height:1.55;margin:0}
.shelf-action{flex:none;align-self:center}
.shelf-form{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.shelf-form input{flex:1 1 190px;min-width:0;font-size:16px;padding:9px 11px;
  border:1px solid var(--line-2);border-radius:8px;background:#fff;color:var(--ink)}
.shelf-form input:focus-visible{outline:none;box-shadow:var(--ring);border-color:var(--accent)}
/* One quiet line above the signup box. Deliberately not a heading and
   not a card — the offer should read as an aside, not a pitch. */
.shelf-line{font-size:13.5px;color:var(--ink-2);line-height:1.6;margin:0}
.shelf-line b{color:var(--ink)}
.shelf-note{font-size:11px;color:var(--muted);line-height:1.5;margin:8px 0 0}
.shelf-note[data-state="error"]{color:#b23b3b;font-weight:600}

@media(max-width:640px){
  .shelf-card{padding:13px 14px}
  .shelf-action{width:100%;min-height:44px}
  .shelf-form button{width:100%;min-height:44px}
}

/* Offline notice. Sits in the flow, never over the top of anything. */
.offline-bar{display:none;align-items:center;gap:9px;font-size:12.5px;
  padding:9px 14px;border-radius:10px;margin-bottom:14px;
  background:#fff6e5;border:1px solid #f0d9a8;color:#7a5a12}
html[data-offline="1"] .offline-bar{display:flex}


/* ---- 16. Floating install button ----
   Always visible, bottom right, every page. It does not hide itself when
   the browser reports no install API — it explains how to do it by hand
   instead. A button that vanishes is indistinguishable from one that was
   never built. */
.net-fab{position:fixed;right:16px;bottom:16px;z-index:900;display:flex;align-items:stretch;gap:0;
  box-shadow:0 10px 30px -10px rgba(15,18,40,.45);border-radius:999px;overflow:hidden;max-width:calc(100vw - 32px)}
.net-fab-btn{display:flex;align-items:center;gap:8px;border:0;cursor:pointer;
  background:var(--accent-d);color:#fff;font-weight:700;font-size:13px;
  padding:12px 16px;min-height:48px;font-family:inherit;white-space:nowrap}
.net-fab-btn:hover{filter:brightness(1.08)}
.net-fab-btn:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #fff}
.net-fab-ico{font-size:15px;line-height:1}
.net-fab-x{border:0;cursor:pointer;background:var(--accent-d);color:rgba(255,255,255,.75);
  padding:0 13px 0 4px;font-size:12px;min-height:48px;min-width:34px;font-family:inherit}
.net-fab-x:hover{color:#fff}
.net-fab.open{border-radius:14px;background:#fff;max-width:min(340px,calc(100vw - 32px))}
.net-fab-help{padding:16px 17px;background:#fff;border:1px solid var(--line);border-radius:14px}
.net-fab-help b{display:block;font-size:13.5px;color:var(--ink);margin-bottom:6px}
.net-fab-help p{font-size:12.5px;color:var(--ink-2);line-height:1.6;margin:0 0 8px}
.net-fab-help .net-fab-why{color:var(--muted);font-size:11.5px}
.net-fab-help button{width:100%;margin-top:4px}

@media(max-width:640px){
  .net-fab{right:12px;bottom:12px}
  .net-fab-btn{min-height:52px;font-size:13.5px;padding:12px 15px}
  .net-fab-x{min-height:52px}
  .net-fab-btn .net-fab-txt{max-width:46vw;overflow:hidden;text-overflow:ellipsis}
}
@media print{ .net-fab{display:none} }

/* ==================================================================
   MOBILE FIXES FOR THE STUDIO PANELS  (added v49)
   ------------------------------------------------------------------
   Found by testing on a real phone, not by reading the markup.

   Every rule here is written as `body .thing` rather than `.thing`.
   That is deliberate and not decoration: each Studio defines its own
   .action-bar and .controls-row in an inline <style> block, which the
   browser reads AFTER this file. At equal specificity the later rule
   wins, so a plain `.action-bar` here would lose on every page. The
   extra `body` raises specificity by one element and settles it.
   ================================================================== */

/* 1. The action bar was a single non-wrapping flex row. On a phone the
      Download button was pushed off the side of the screen. */
@media (max-width: 860px) {
  body .action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  body .action-bar > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  body .action-bar .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
  body .action-bar .info {
    text-align: center;
    word-break: break-word;
  }
}

/* 2. The post-export offer block. It used to live inside the button row
      and stretched it; it is now a sibling underneath. */
.done-offers { margin-top: 12px; }
.done-offers:not(:has(> :not([hidden]))) { display: none; margin-top: 0; }
.done-offers:empty { display: none; }

/* 3. Panel controls stacked one per line, so opening Text on a phone
      pushed everything else off screen. Two columns, with the controls
      that genuinely need full width spanning both. */
@media (max-width: 860px) {
  body .feature-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    align-items: center;
  }
  body .feature-opts > .controls-row {
    margin-top: 0;
    min-width: 0;
    flex-wrap: wrap;
  }
  /* A slider, a textarea or a swatch grid is unusable at half width. */
  body .feature-opts > .controls-row:has(textarea),
  body .feature-opts > .controls-row:has(input[type="range"]),
  body .feature-opts > .font-grid,
  body .feature-opts > .aspect-grid,
  body .feature-opts > .preset-grid,
  body .feature-opts > .swatch-row {
    grid-column: 1 / -1;
  }
  body .controls-row label { min-width: 0; }
  body .controls-row select,
  body .controls-row input[type="text"],
  body .controls-row input[type="number"] {
    min-width: 0;
    flex: 1 1 auto;
  }
}

/* 4. Nothing may push the page sideways on a phone. */
@media (max-width: 860px) {
  body .tool-panel, body .canvas-stage, body .action-bar { max-width: 100%; }
  body .tool-panel { overflow-x: hidden; }
}
