/* PDFPro shared stylesheet — used by every page generated by build.py */
*{box-sizing:border-box;margin:0;padding:0}
:root{
  --red:#E02020;--red-dark:#C41A1A;--red-light:#FF4444;
  --navy:#0D1B2A;--navy-light:#162333;
  --cream:#F8F5F0;--border:#D8D0C4;
  --text:#0D1B2A;--muted:#5A6A7A;--white:#FFFFFF;
  --ok:#15803d;--warn:#b45309;--err:#b91c1c;
}
body{font-family:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--cream);color:var(--text);direction:ltr}
body.rtl{direction:rtl;font-family:'Heebo',system-ui,-apple-system,'Segoe UI',sans-serif}
a{color:var(--red-dark)}
:focus-visible{outline:3px solid rgba(224,32,32,.45);outline-offset:2px}

/* ── NAV ── */
.site-nav{background:var(--navy);padding:0 3rem;height:68px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:100;border-bottom:2px solid var(--red)}
.logo{font-size:1.6rem;font-weight:900;color:var(--white);letter-spacing:-.5px;text-decoration:none;white-space:nowrap}
.logo span{color:var(--red-light)}
.nav-links{display:flex;align-items:center;gap:2rem;list-style:none}
.nav-links a{color:rgba(255,255,255,.75);text-decoration:none;font-size:.95rem;font-weight:500;white-space:nowrap}
.nav-links a:hover,.nav-links a.active{color:var(--white)}
.nav-right{display:flex;align-items:center;gap:.8rem}
.nav-cta{background:var(--red);color:var(--white);padding:.55rem 1.4rem;border-radius:6px;font-weight:700;font-size:.9rem;text-decoration:none;white-space:nowrap}
.nav-cta:hover{background:var(--red-dark)}
.api-status{display:inline-flex;align-items:center;gap:.4rem;font-size:.78rem;font-weight:600;padding:.25rem .7rem;border-radius:20px;white-space:nowrap;background:rgba(255,255,255,.08);color:rgba(255,255,255,.7)}
.api-status.online{background:rgba(34,197,94,.15);color:#4ade80}
.api-status.waking{background:rgba(245,158,11,.15);color:#fbbf24}
.api-status.offline{background:rgba(239,68,68,.15);color:#f87171}
.api-dot{width:6px;height:6px;border-radius:50%;background:currentColor}

/* ── FOOTER ── */
.site-footer{background:var(--navy);padding:3rem;margin-top:4rem}
.footer-inner{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:3rem;align-items:start}
.footer-brand p{font-size:.85rem;color:rgba(255,255,255,.7);line-height:1.6;margin-top:.8rem}
.footer-col h2{font-size:.85rem;font-weight:700;color:rgba(255,255,255,.55);margin:0 0 1rem}
.footer-col ul{list-style:none}
.footer-col li{margin-bottom:.6rem}
.footer-col a{color:rgba(255,255,255,.65);text-decoration:none;font-size:.88rem}
.footer-col a:hover{color:var(--white)}
.footer-lang{margin-top:1.2rem;display:flex;gap:.5rem;flex-wrap:wrap}
.footer-lang a{color:rgba(255,255,255,.65);text-decoration:none;font-size:.85rem;border:1px solid rgba(255,255,255,.2);border-radius:6px;padding:.35rem .8rem}
.footer-lang a[aria-current="true"]{color:var(--white);border-color:var(--red)}
.footer-bottom{max-width:1100px;margin:2rem auto 0;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,.08);color:rgba(255,255,255,.65);font-size:.82rem}

/* ── CONTENT ── */
.container{max-width:860px;margin:0 auto;padding:3rem 1.5rem}
.container.narrow{max-width:760px}
h1{font-size:2rem;font-weight:900;color:var(--navy);margin-bottom:1rem;letter-spacing:-.5px;line-height:1.25}
h2{font-size:1.25rem;font-weight:800;color:var(--navy);margin:2.2rem 0 .7rem;line-height:1.35}
h3{font-size:1rem;font-weight:700;color:var(--navy);margin:1.2rem 0 .4rem}
p{color:var(--muted);line-height:1.8;margin-bottom:.9rem}
.lead{font-size:1.08rem;line-height:1.8;margin-bottom:1.6rem;color:var(--text)}
.prose ul,.prose ol,ul.article-list{margin:0 0 1rem 1.3rem;color:var(--muted);line-height:1.85}
body.rtl .prose ul,body.rtl .prose ol,body.rtl ul.article-list{margin:0 1.3rem 1rem 0}
.prose li,ul.article-list li{margin-bottom:.4rem}
.prose strong{color:var(--text)}
.card{background:white;border-radius:12px;border:1px solid var(--border);padding:1.4rem;margin-bottom:1rem}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1.5rem}
.cta{display:inline-block;background:var(--red);color:white;padding:.8rem 2rem;border-radius:8px;text-decoration:none;font-weight:700;margin-top:1rem;border:none;font:inherit;font-weight:700;cursor:pointer}
.cta:hover{background:var(--red-dark)}
.breadcrumb{font-size:.85rem;color:var(--muted);margin-bottom:1.5rem}
.breadcrumb ol{list-style:none;display:flex;flex-wrap:wrap;gap:.4rem}
.breadcrumb li+li::before{content:"›";margin-inline-end:.4rem}
body.rtl .breadcrumb li+li::before{content:"‹"}
.breadcrumb a{color:var(--muted);text-decoration:none}
.breadcrumb a:hover{color:var(--red)}
.breadcrumb [aria-current]{color:var(--navy);font-weight:600}
.meta{font-size:.82rem;color:var(--muted);margin-bottom:1.5rem}
.tag{display:inline-block;background:rgba(224,32,32,.08);color:var(--red-dark);font-size:.75rem;font-weight:700;padding:.2rem .6rem;border-radius:4px;margin-bottom:.6rem}
details{border:1px solid var(--border);border-radius:10px;padding:1rem 1.2rem;margin-bottom:.8rem;background:white}
summary{font-weight:700;cursor:pointer;color:var(--navy)}
details p{margin:.8rem 0 0}

/* blog */
.blog-card{display:block;background:white;border-radius:12px;border:1px solid var(--border);padding:1.5rem;margin-bottom:1rem;text-decoration:none}
.blog-card:hover{border-color:var(--red)}
.blog-card h2{margin:.3rem 0 .4rem;font-size:1.08rem}
.blog-card p{font-size:.9rem;margin:0}
.blog-card time{font-size:.78rem;color:var(--muted);display:block}
.article-cta{text-align:center;margin-top:2.5rem}
.article-cta p{color:var(--navy);font-weight:700;margin-bottom:.2rem}

/* tool page */
.tool{background:white;border:1px solid var(--border);border-radius:14px;padding:1.5rem;margin-bottom:1rem}
.dropzone{display:block;border:2px dashed var(--border);border-radius:12px;padding:2.6rem 1rem;text-align:center;cursor:pointer;transition:border-color .15s,background .15s}
.dropzone:hover,.dropzone.drag{border-color:var(--red);background:#fff7f7}
.dropzone strong{display:block;font-size:1.1rem;color:var(--navy);margin-bottom:.35rem}
.dropzone span{color:var(--muted);font-size:.9rem}
.dropzone small{display:block;margin-top:.7rem;color:var(--muted);font-size:.8rem}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.file-list{list-style:none;margin:1rem 0 0}
.file-list li{display:flex;align-items:center;gap:.6rem;padding:.55rem .8rem;border:1px solid var(--border);border-radius:8px;margin-bottom:.4rem;font-size:.9rem}
.file-list .fname{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.file-list .fsize{color:var(--muted);font-size:.8rem}
.file-list button{background:none;border:1px solid var(--border);border-radius:6px;padding:.15rem .5rem;cursor:pointer;color:var(--muted);font:inherit;font-size:.8rem}
.file-list button:hover{border-color:var(--red);color:var(--red)}
.tool-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-top:1.2rem}
.tool-options label{display:block;font-size:.85rem;font-weight:600;color:var(--navy);margin-bottom:.35rem}
.tool-options select,.tool-options input{width:100%;padding:.65rem .8rem;border-radius:8px;border:1px solid var(--border);font:inherit;font-size:.92rem;background:white;color:var(--text)}
.tool-options .hint{font-size:.78rem;color:var(--muted);margin:.3rem 0 0}
.tool-actions{margin-top:1.2rem;display:flex;gap:.8rem;align-items:center;flex-wrap:wrap}
.tool-actions .cta{margin-top:0}
.tool-actions .cta[disabled]{opacity:.5;cursor:not-allowed}
.link-btn{background:none;border:none;color:var(--muted);text-decoration:underline;cursor:pointer;font:inherit;font-size:.9rem}
.tool-status{margin-top:1rem;font-size:.92rem;min-height:1.4em}
.tool-status.error{color:var(--err);font-weight:600}
.tool-status.busy{color:var(--navy)}
.progress{height:6px;background:#eee;border-radius:3px;overflow:hidden;margin-top:.6rem;display:none}
.progress.show{display:block}
.progress div{height:100%;width:0;background:var(--red);border-radius:3px;transition:width .4s ease}
.progress.indeterminate div{width:30%;transition:none;animation:slide 1.2s ease-in-out infinite}
@keyframes slide{0%{transform:translateX(-100%)}100%{transform:translateX(350%)}}
[dir=rtl] .progress.indeterminate div{animation-direction:reverse}
[dir=rtl] .progress div{margin-left:auto}
@media (prefers-reduced-motion:reduce){.progress.indeterminate div{animation:none;width:100%;opacity:.6}}
.tool-result{margin-top:1rem;padding:1.2rem;border-radius:10px;background:#f0fdf4;border:1px solid #bbf7d0;display:none}
.tool-result.show{display:block}
.tool-result h2{margin:0 0 .6rem;font-size:1.05rem;color:var(--ok)}
.tool-result .downloads{display:flex;flex-direction:column;gap:.5rem;align-items:flex-start}
.tool-result .cta{margin-top:0}
.tool-result pre{white-space:pre-wrap;background:white;border:1px solid var(--border);border-radius:8px;padding:.8rem;margin-top:.8rem;max-height:220px;overflow:auto;font-size:.85rem;color:var(--text)}
.tool-note{font-size:.85rem;color:var(--muted);margin-top:.4rem}
#tool-preview{unicode-bidi:plaintext;text-align:start;white-space:pre-wrap}
.steps{counter-reset:s;list-style:none;margin:0}
.steps li{counter-increment:s;position:relative;padding-inline-start:3rem;margin-bottom:1.2rem}
.steps li::before{content:counter(s);position:absolute;inset-inline-start:0;top:0;width:2rem;height:2rem;border-radius:50%;background:var(--navy);color:white;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:.9rem}
.steps h3{margin:0 0 .2rem}
.steps p{margin:0}
.chip-row{display:flex;flex-wrap:wrap;gap:.6rem;list-style:none}
.chip-row a{display:inline-block;padding:.5rem 1rem;background:white;border:1px solid var(--border);border-radius:8px;text-decoration:none;color:var(--navy);font-weight:600;font-size:.9rem}
.chip-row a:hover{border-color:var(--red)}

/* contact / pricing */
.plan{background:white;border:2px solid var(--red);border-radius:14px;padding:2rem;margin:1.5rem 0}
.plan .price{font-size:2.4rem;font-weight:900;color:var(--navy)}
.limits{width:100%;border-collapse:collapse;background:white;border-radius:10px;overflow:hidden;margin:1rem 0 1.5rem;font-size:.92rem}
.limits th,.limits td{padding:.7rem 1rem;border-bottom:1px solid var(--border);text-align:start}
.limits th{background:#faf8f5;color:var(--navy)}
.limits td{color:var(--muted)}

@media(max-width:768px){
  .site-nav{padding:0 1rem;height:56px}
  .nav-links{display:none}
  .logo{font-size:1.3rem}
  .nav-cta{padding:.45rem 1rem;font-size:.82rem}
  .api-status{display:none}
  .site-footer{padding:2rem 1rem}
  .footer-inner{grid-template-columns:1fr 1fr;gap:1.5rem}
  .footer-brand{grid-column:1/-1}
  .grid-2{grid-template-columns:1fr}
  .container{padding:2rem 1rem}
  h1{font-size:1.55rem}
  .dropzone{padding:2rem 1rem}
}

/* inline examples: keep the body font (monospace Hebrew looks broken), isolate direction for numbers */
.prose code{font-family:inherit;background:#efe9e0;color:var(--text);padding:.1rem .45rem;border-radius:4px;font-size:.95em;unicode-bidi:isolate}

/* signature pad (Sign PDF) */
.tool-options .sig{grid-column:1/-1}
.sig-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.5rem;flex-wrap:wrap}
.sig-label{font-size:.85rem;font-weight:600;color:var(--navy)}
.sig-tabs{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}
.sig-tabs button{background:white;border:0;padding:.4rem 1rem;font:inherit;font-size:.88rem;color:var(--muted);cursor:pointer}
.sig-tabs button[aria-pressed="true"]{background:var(--navy);color:white;font-weight:600}
.sig-draw{position:relative}
.sig-draw[hidden],.sig-type[hidden]{display:none}
#sig-canvas{display:block;width:100%;height:180px;background:white;border:1px solid var(--border);border-radius:10px;touch-action:none;cursor:crosshair;
  background-image:linear-gradient(var(--border),var(--border));background-size:calc(100% - 3rem) 1px;background-position:center 75%;background-repeat:no-repeat}
.sig-hint{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#a39a8c;font-size:.95rem;pointer-events:none;padding:0 1rem;text-align:center}
.sig.has-ink .sig-hint{display:none}
.sig-clear{position:absolute;top:.5rem;inset-inline-end:.75rem;display:none}
.sig.has-ink .sig-clear{display:block}
.sig-type label{display:block;font-size:.85rem;font-weight:600;color:var(--navy);margin-bottom:.35rem}
