/* ============================================================
   NasrTech tools — shared layer for every page under /tools/,
   /image-compressor/ and /docflow/tools/.
   Loaded after /blog/assets/blog.css and /docflow/tools/tools.css.
   Colours come from the blog.css tokens (never a literal accent
   here), so a theme change there carries over to the tools.
   ============================================================ */
:root{
  --tl-accent:var(--accent,var(--orange));
  --tl-link:var(--link,var(--coral));
}

main{padding-bottom:var(--sp-3xl)}
main .container{min-width:0}

/* ---------- breadcrumb ---------- */
.tl-crumb{padding:1rem 0 0;font-size:.84rem;color:var(--text-muted)}
.tl-crumb ol{list-style:none;display:flex;flex-wrap:wrap;gap:.2rem .4rem;justify-content:center;margin:0;padding:0}
.tl-crumb li{display:inline-flex;align-items:center;gap:.4rem}
.tl-crumb li+li::before{content:"\203A";color:var(--text-muted)}
.tl-crumb a{color:var(--text-soft);font-weight:600}
.tl-crumb a:hover{color:var(--text)}
.tl-crumb [aria-current]{color:var(--text);font-weight:600}

/* ---------- compact tool hero ---------- */
.tl-hero{text-align:center;padding:.9rem 0 0}
.tl-hero h1{font-size:clamp(1.7rem,3.6vw,2.45rem);line-height:1.12;font-weight:800;letter-spacing:-.02em;
  margin:0 auto;max-width:34ch;text-wrap:balance}
.tl-lead{margin:.65rem auto 0;color:var(--text-soft);font-size:1.02rem;line-height:1.55;max-width:64ch}
.tl-lead code,.tl-hero code{font-family:var(--mono);font-size:.92em}
.tl-facts{list-style:none;display:flex;flex-wrap:wrap;gap:.3rem 1.15rem;justify-content:center;
  margin:.8rem 0 0;padding:0;font-size:.84rem;font-weight:600;color:var(--text-soft)}
.tl-facts li{display:inline-flex;align-items:center;gap:.4rem}
.tl-facts li::before{content:"";width:.45rem;height:.45rem;border-radius:50%;background:var(--teal);flex:none}
.tl-facts a{color:var(--tl-link);text-decoration:underline;text-underline-offset:2px}

/* the tool itself sits right under the hero */
.tl-tool{padding:0 0 var(--sp-lg)}
.tl-tool .workspace{margin-top:1.1rem}
.workspace{min-width:0}
.ws-head{margin-bottom:var(--sp-md)}
.ws-head h2{font-size:1.2rem}

/* ---------- inline "next step" card (assets/tool-success-popup.js) ---------- */
.tl-next{margin:1rem 0 0;background:var(--surface);border:1px solid var(--border);
  border-inline-start:4px solid var(--tl-accent);border-radius:var(--radius-sm);padding:1rem 1.1rem;box-shadow:var(--sh-sm)}
.tl-next[hidden]{display:none}
.tl-next-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.tl-next-head h2{font-size:1rem;font-weight:800;margin:0}
.tl-next-x{appearance:none;border:1px solid transparent;background:none;cursor:pointer;color:var(--text-muted);
  width:34px;height:34px;border-radius:9px;display:grid;place-items:center;flex:none}
.tl-next-x:hover{border-color:var(--border);color:var(--text)}
.tl-next-x svg{width:16px;height:16px}
.tl-next ul{list-style:none;margin:.7rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:.6rem}
.tl-next li a{display:block;height:100%;border:1px solid var(--border);border-radius:12px;padding:.65rem .8rem;
  background:var(--bg);color:var(--text);transition:border-color .15s}
.tl-next li a:hover{border-color:var(--tl-accent);color:var(--text)}
.tl-next li b{display:block;font-size:.92rem;font-weight:700}
.tl-next li span{display:block;font-size:.8rem;color:var(--text-soft);margin-top:.12rem;line-height:1.4}

/* ---------- copy blocks ---------- */
.tl-prose{max-width:var(--measure);margin-inline:auto;color:var(--text-soft)}
.tl-prose p+p,.tl-prose p+ul,.tl-prose ul+p{margin-top:.9rem}
.tl-prose ul,.tl-prose ol{padding-inline-start:1.2rem;line-height:1.8}
.tl-prose a,.faq-tools details a,.how .step a,.section-head p a,.tl-note a{color:var(--tl-link);text-decoration:underline;text-underline-offset:2px}
.tl-prose code,.faq-tools code,.how code{font-family:var(--mono);font-size:.9em;background:var(--bg-2);padding:.08em .35em;border-radius:5px}
.tl-note{max-width:var(--measure);margin:1rem auto 0;padding:.8rem 1rem;border:1px solid var(--border);
  border-inline-start:4px solid var(--tl-accent);border-radius:12px;background:var(--surface);color:var(--text-soft);font-size:.93rem}
.tl-note strong{color:var(--text)}
.section-head h2{text-wrap:balance}
.section{scroll-margin-top:76px}
[id]{scroll-margin-top:76px}

/* tables */
.tl-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:880px;margin:0 auto}
.tl-table{width:100%;border-collapse:collapse;font-size:.92rem;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-sm);overflow:hidden;min-width:540px}
.tl-table th,.tl-table td{padding:.6rem .8rem;text-align:start;border-bottom:1px solid var(--border);vertical-align:top}
.tl-table th{font-weight:800;color:var(--text-soft);font-size:.78rem;text-transform:uppercase;letter-spacing:.04em}
.tl-table tr:last-child td{border-bottom:none}
.tl-table code{font-family:var(--mono);font-size:.9em}
.tl-table-note{max-width:var(--measure);margin:.9rem auto 0;color:var(--text-soft);font-size:.9rem;text-align:center}
.tl-table-note a{color:var(--tl-link);text-decoration:underline;text-underline-offset:2px}
.tl-swatch{display:inline-block;width:1rem;height:1rem;border-radius:4px;border:1px solid var(--border);vertical-align:-.15em;margin-inline-end:.45rem}

/* figure used on the Play icon page */
.tl-figure{max-width:640px;margin:1.4rem auto 0;color:var(--text)}
.tl-figure svg{width:100%;height:auto;display:block}
.tl-figure figcaption{margin-top:.6rem;font-size:.9rem;color:var(--text-soft);text-align:center;max-width:56ch;margin-inline:auto}

/* ---------- Store Kit promotion: one block, below the tool ---------- */
.tl-promo{display:grid;grid-template-columns:minmax(0,300px) minmax(0,1fr) auto;gap:1rem 1.4rem;align-items:center;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.1rem 1.3rem;box-shadow:var(--sh-sm)}
.tl-promo img{width:100%;height:auto;border-radius:10px;display:block}
.tl-promo .tl-tag{display:inline-block;font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  color:var(--text-muted);margin-bottom:.3rem}
.tl-promo h2{font-size:1.15rem;font-weight:800;margin:0 0 .3rem;line-height:1.25}
.tl-promo p{color:var(--text-soft);font-size:.93rem;margin:0;max-width:60ch}
.tl-promo .btn{white-space:nowrap}
@media(max-width:860px){
  .tl-promo{grid-template-columns:1fr;padding:1rem}
  .tl-promo .btn{justify-content:center;white-space:normal;text-align:center}
}

/* ---------- guides for this tool ---------- */
.tl-guides ul{list-style:none;max-width:880px;margin:0 auto;padding:0;display:grid;gap:.7rem;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.tl-guides li a{display:block;height:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:.85rem 1rem;color:var(--text);font-weight:700;line-height:1.35;box-shadow:var(--sh-sm);transition:border-color .15s}
.tl-guides li a:hover{border-color:var(--tl-accent);color:var(--text)}
.tl-guides li span{display:block;font-weight:400;color:var(--text-soft);font-size:.88rem;margin-top:.25rem;line-height:1.45}

/* ---------- related tools, grouped by purpose ---------- */
.tl-related{display:grid;gap:1.1rem;max-width:880px;margin:0 auto}
.tl-related h3{font-size:.76rem;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted);
  margin:0 0 .55rem;text-align:center;font-weight:700}
.tl-related .rz-popular{justify-content:center;margin:0}

/* ---------- byline ---------- */
.tl-byline{max-width:var(--measure);margin:var(--sp-lg) auto 0;padding-top:var(--sp-md);border-top:1px solid var(--border);
  text-align:center;color:var(--text-muted);font-size:.86rem}
.tl-byline a{color:var(--tl-link);text-decoration:underline;text-underline-offset:2px}

/* ---------- small fixes shared by the tool widgets ---------- */
.how .step{min-width:0}
.faq-tools{max-width:880px;margin-inline:auto}
.faq-tools summary:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible,
label:has(input:focus-visible){outline:2px solid var(--tl-accent);outline-offset:2px;border-radius:6px}
.dropzone{background:var(--surface)}
.privacy-chip svg{color:var(--tl-accent)}
.rz-note{margin-top:.6rem;font-size:.84rem;color:var(--text-soft)}
.rz-note strong{color:var(--text)}
.ic-warn{flex-basis:100%;font-size:.78rem;font-weight:600;color:var(--text);background:var(--bg-2);border:1px solid var(--border);
  border-radius:8px;padding:.3rem .55rem;margin-top:.3rem}
.ic-warn a{color:var(--tl-link);text-decoration:underline}
@media(max-width:560px){
  .tl-hero h1{font-size:1.6rem}
  .tl-lead{font-size:.97rem}
  .actionbar{gap:.6rem}
  .actionbar .btn{width:100%;justify-content:center}
  .workspace{padding:1rem}
}

/* ============================================================
   Tools hub (/tools/)
   ============================================================ */
.th-hero{text-align:center;padding:1.1rem 0 .4rem}
.th-hero h1{font-size:clamp(1.9rem,4.4vw,2.9rem);line-height:1.08;font-weight:800;letter-spacing:-.02em;margin:0 auto;max-width:20ch;text-wrap:balance}
.th-hero p{margin:.8rem auto 0;color:var(--text-soft);font-size:1.08rem;max-width:62ch;line-height:1.55}
.th-hero .th-by{font-size:.92rem;margin-top:.7rem}
.th-hero .th-by a,.th-who a{color:var(--tl-link);text-decoration:underline;text-underline-offset:2px}

.th-sec{padding:var(--sp-xl) 0 0}
.th-sec>h2{font-size:clamp(1.3rem,2.6vw,1.7rem);font-weight:800;letter-spacing:-.01em;margin:0}
.th-sec>p.th-sub{color:var(--text-soft);margin:.3rem 0 1.1rem;max-width:70ch}
.th-sec>h3{font-size:.78rem;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted);font-weight:700;margin:1.5rem 0 .7rem}

.th-grid{display:grid;gap:var(--sp-md);grid-template-columns:repeat(auto-fill,minmax(205px,1fr))}
.th-grid.th-big{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.th-card{display:flex;flex-direction:column;gap:.5rem;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-sm);padding:1.05rem 1.05rem 1.1rem;color:var(--text);box-shadow:var(--sh-sm);
  transition:transform .15s,border-color .15s,box-shadow .15s;min-width:0}
.th-card:hover{transform:translateY(-3px);border-color:var(--tl-accent);box-shadow:var(--sh-md);color:var(--text)}
.th-card h3{font-size:1.02rem;font-weight:700;line-height:1.25;margin:0}
.th-card p{font-size:.88rem;color:var(--text-soft);line-height:1.45;margin:0}
.th-card .th-ico{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--bg-2);color:var(--text)}
.th-card .th-ico svg{width:20px;height:20px}
.th-badge{display:inline-flex;align-self:flex-start;font-size:.74rem;font-weight:800;letter-spacing:.02em;
  background:var(--bg-2);border:1px solid var(--border);color:var(--text);border-radius:999px;padding:.18rem .6rem;
  font-variant-numeric:tabular-nums}
/* size thumbnails: the real aspect ratio of the asset */
.th-shape{display:grid;place-items:center;height:76px;margin-bottom:.15rem}
.th-shape i{display:block;border:2px solid var(--tl-accent);border-radius:8px;background:var(--bg-2)}
.th-shape .sq{width:64px;height:64px;border-radius:14px}
.th-shape .wide{width:132px;height:64px}
.th-shape .set{width:64px;height:64px;border-radius:14px;box-shadow:10px 8px 0 -2px var(--bg-2),10px 8px 0 0 var(--tl-accent)}
.th-shape img{height:76px;width:auto;border-radius:10px;border:1px solid var(--border)}

.th-steps{list-style:none;counter-reset:th;margin:0;padding:0;display:grid;gap:.6rem;grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}
.th-steps li{counter-increment:th;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:.8rem .9rem .85rem;font-size:.88rem;color:var(--text-soft);line-height:1.45;min-width:0}
.th-steps li::before{content:counter(th);display:grid;place-items:center;width:24px;height:24px;border-radius:50%;
  background:var(--text);color:var(--surface);font-weight:800;font-size:.78rem;margin-bottom:.45rem}
.th-steps li b{display:block;color:var(--text);font-size:.94rem;margin-bottom:.1rem}
.th-steps a{color:var(--tl-link);text-decoration:underline;text-underline-offset:2px;font-weight:600}

.th-row{display:flex;flex-wrap:wrap;gap:.5rem}
.th-row a{display:inline-flex;align-items:center;gap:.45rem;background:var(--surface);border:1px solid var(--border);
  border-radius:999px;padding:.5rem .95rem;font-weight:600;font-size:.9rem;color:var(--text);box-shadow:var(--sh-sm)}
.th-row a:hover{border-color:var(--tl-accent);color:var(--text)}
.th-row a small{font-weight:500;color:var(--text-muted);font-size:.8rem}

.th-guides{list-style:none;margin:0;padding:0;display:grid;gap:.7rem;grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.th-guides a{display:block;height:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:.9rem 1rem;color:var(--text);font-weight:700;line-height:1.35;box-shadow:var(--sh-sm)}
.th-guides a:hover{border-color:var(--tl-accent);color:var(--text)}
.th-guides span{display:block;font-weight:400;color:var(--text-soft);font-size:.88rem;margin-top:.25rem;line-height:1.45}
.th-more{margin-top:.9rem;font-size:.92rem}
.th-more a{color:var(--tl-link);text-decoration:underline;text-underline-offset:2px;font-weight:600}
.th-who{margin:var(--sp-xl) auto 0;max-width:var(--measure);text-align:center;color:var(--text-soft);font-size:.95rem}
.th-sec .faq-tools{margin-top:1rem;max-width:none}
@media(max-width:560px){
  .th-grid,.th-grid.th-big{grid-template-columns:1fr 1fr;gap:.7rem}
  .th-card{padding:.85rem}
  .th-card h3{font-size:.95rem}
  .th-shape{height:64px}
  .th-shape .wide{width:104px;height:51px}
  .th-shape .sq,.th-shape .set{width:52px;height:52px}
}
@media(max-width:380px){.th-grid,.th-grid.th-big{grid-template-columns:1fr}}

/* ---------- paragraphs and lists carried over from the tool copy ---------- */
.tl-p{max-width:var(--measure);margin-inline:auto;color:var(--text-soft)}
.tl-p+.tl-p,.tl-p+.tl-ul,.tl-ul+.tl-p{margin-top:.9rem}
.tl-ul{max-width:var(--measure);margin-inline:auto;color:var(--text-soft);line-height:1.75;padding-inline-start:1.2rem}
.tl-ul li+li{margin-top:.35rem}
.tl-p a,.tl-ul a{color:var(--tl-link);text-decoration:underline;text-underline-offset:2px}
.tl-p code,.tl-ul code,.section-head p code{font-family:var(--mono);font-size:.9em;background:var(--bg-2);padding:.08em .35em;border-radius:5px}
.tl-p b,.tl-ul b,.tl-p strong{color:var(--text)}

/* ---------- icon sizing + phone-first workspace ---------- */
.btn svg{width:18px;height:18px;flex:none}
.rz-chip svg{width:14px;height:14px}
.dropzone{padding:1.6rem 1.2rem}
.dz-icon{width:52px;height:52px;margin-bottom:.7rem}
.dz-icon svg{width:26px;height:26px}
@media(max-width:640px){
  .ws-head p{display:none}
  .ws-head{margin-bottom:.7rem}
  #rzPopular{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:.2rem;
    margin-inline:-1rem;padding-inline:1rem;-webkit-mask-image:linear-gradient(90deg,#000 92%,transparent);mask-image:linear-gradient(90deg,#000 92%,transparent)}
  #rzPopular::-webkit-scrollbar{display:none}
  #rzPopular .rz-chip{white-space:nowrap;flex:none}
  .tl-facts{font-size:.8rem;gap:.2rem .8rem}
  .dropzone{padding:1.2rem 1rem}
  .dropzone .hint{display:none}
}
.tl-p code,.tl-ul code,.faq-tools code,.tl-table code{overflow-wrap:anywhere}
@media(max-width:640px){#rzPopular{justify-content:flex-start}}
