/* Nextoq Tools — single stylesheet. Mobile-first, no frameworks. */
:root{
  --bg:#f7f8fb; --card:#ffffff; --text:#1a2233; --muted:#5b6475; --line:#e3e7ef;
  --brand:#0f7b6c; --brand-dark:#0a5e53; --brand-soft:#e6f4f1; --accent:#f2a33a;
  --danger:#c0392b; --radius:14px; --shadow:0 1px 2px rgba(16,24,40,.05),0 4px 16px rgba(16,24,40,.06);
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.6;font-size:16px}
img{max-width:100%;height:auto}
a{color:var(--brand-dark)}
a:hover{color:var(--brand)}
.container{max-width:1080px;margin:0 auto;padding:0 18px}
.skip{position:absolute;left:-999px}.skip:focus{left:8px;top:8px;background:#fff;padding:8px;z-index:99}

/* Header */
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.site-header .container{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px}
.logo{font-weight:800;font-size:1.25rem;text-decoration:none;color:var(--text);display:flex;align-items:center;gap:8px}
.logo span{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--brand);color:#fff;font-size:1rem}
.nav{display:flex;gap:4px;flex-wrap:wrap}
.nav a{text-decoration:none;color:var(--muted);padding:8px 10px;border-radius:8px;font-size:.95rem;font-weight:500}
.nav a:hover,.nav a[aria-current="page"]{background:var(--brand-soft);color:var(--brand-dark)}
.menu-btn{display:none;background:none;border:1px solid var(--line);border-radius:8px;padding:6px 10px;font-size:1rem}
@media (max-width:820px){
  .menu-btn{display:block}
  .nav{display:none;position:absolute;top:60px;left:0;right:0;background:#fff;border-bottom:1px solid var(--line);flex-direction:column;padding:8px 18px 14px}
  .nav.open{display:flex}
}

/* Layout */
main{padding:24px 0 40px}
.breadcrumbs{font-size:.85rem;color:var(--muted);margin-bottom:10px}
.breadcrumbs a{color:var(--muted);text-decoration:none}
.breadcrumbs a:hover{text-decoration:underline}
h1{font-size:clamp(1.6rem,4vw,2.3rem);line-height:1.2;margin:.2em 0 .3em}
h2{font-size:1.35rem;margin:1.6em 0 .5em}
h3{font-size:1.08rem;margin:1.2em 0 .4em}
.lead{color:var(--muted);font-size:1.08rem;margin-top:0;max-width:760px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}
.grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.tool-card{display:block;text-decoration:none;color:var(--text);background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px;transition:.15s;box-shadow:var(--shadow)}
.tool-card:hover{border-color:var(--brand);transform:translateY(-2px);color:var(--text)}
.tool-card .ico{font-size:1.6rem}
.tool-card h3{margin:.4em 0 .2em;font-size:1.05rem}
.tool-card p{margin:0;color:var(--muted);font-size:.92rem}
.hero{padding:26px 0 8px}
.hero h1{font-size:clamp(1.8rem,5vw,2.8rem)}
.section-title{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.section-title a{font-size:.92rem}
.answer{background:var(--brand-soft);border-left:4px solid var(--brand);padding:14px 16px;border-radius:10px;margin:14px 0}
.answer p{margin:.2em 0}
.note{font-size:.88rem;color:var(--muted)}
.warn{background:#fff7e8;border:1px solid #f5d9a6;padding:12px 14px;border-radius:10px;font-size:.92rem}
.prose{max-width:780px}
.prose li{margin:.3em 0}
table{border-collapse:collapse;width:100%;font-size:.95rem}
th,td{border:1px solid var(--line);padding:8px 10px;text-align:left;vertical-align:top}
th{background:#f1f4f8}
.table-wrap{overflow-x:auto}

/* Forms */
label{font-weight:600;font-size:.92rem;display:block;margin-bottom:4px}
input[type=text],input[type=email],input[type=tel],input[type=number],input[type=date],input[type=url],select,textarea{
  width:100%;padding:10px 12px;border:1px solid #cfd6e2;border-radius:10px;font:inherit;background:#fff;color:var(--text)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--brand);outline-offset:1px;border-color:var(--brand)}
textarea{min-height:90px;resize:vertical}
.row{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-bottom:14px}
.field{margin-bottom:14px}
.inline{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.inline label{margin:0;font-weight:500}
.btn{display:inline-flex;align-items:center;gap:6px;border:0;border-radius:10px;padding:11px 18px;font:inherit;font-weight:600;cursor:pointer;background:var(--brand);color:#fff;text-decoration:none}
.btn:hover{background:var(--brand-dark);color:#fff}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.secondary{background:#fff;color:var(--brand-dark);border:1px solid var(--brand)}
.btn.secondary:hover{background:var(--brand-soft)}
.btn.small{padding:6px 12px;font-size:.88rem}
.btn.danger{background:#fff;color:var(--danger);border:1px solid #e8b4ae}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}

/* Dropzone + file list */
.dropzone{border:2px dashed #b9c4d4;border-radius:var(--radius);padding:30px 18px;text-align:center;background:#fbfcfe;cursor:pointer;transition:.15s}
.dropzone:hover,.dropzone.drag{border-color:var(--brand);background:var(--brand-soft)}
.dropzone strong{display:block;font-size:1.1rem;margin-bottom:4px}
.dropzone input{display:none}
.file-list{list-style:none;padding:0;margin:16px 0 0;display:grid;gap:10px}
.file-item{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.file-item img,.file-item canvas{width:56px;height:56px;object-fit:cover;border-radius:8px;background:#eef1f5;flex-shrink:0}
.file-item .meta{flex:1;min-width:0}
.file-item .name{font-weight:600;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-item .sub{font-size:.84rem;color:var(--muted)}
.file-item .tools{display:flex;gap:6px;flex-wrap:wrap}
.good{color:var(--brand-dark);font-weight:600}
.status{margin-top:12px;font-size:.92rem;color:var(--muted)}
.status.error{color:var(--danger)}

/* Result boxes */
.result{margin-top:18px;padding:18px;border-radius:var(--radius);background:#fff;border:2px solid var(--brand)}
.result .big{font-size:2rem;font-weight:800;color:var(--brand-dark);line-height:1.1}
.result dl{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;margin:12px 0 0;font-size:.95rem}
.result dt{color:var(--muted)}
.result dd{margin:0;font-weight:600}

/* FAQ */
.faq details{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 16px;margin-bottom:10px}
.faq summary{font-weight:600;cursor:pointer}
.faq details p{margin:.6em 0 .2em}

/* Chips */
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 12px;font-size:.9rem;text-decoration:none;color:var(--text);cursor:pointer;font:inherit}
.chip.active,.chip:hover{background:var(--brand);color:#fff;border-color:var(--brand)}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:16px 0}
.facts div{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px}
.facts span{display:block;font-size:.8rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.facts b{font-size:1.05rem}

/* Resume builder */
.rb{display:grid;gap:20px;grid-template-columns:1fr}
@media (min-width:980px){.rb{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.rb-preview-wrap{position:sticky;top:76px;align-self:start;max-height:calc(100vh - 90px);overflow:auto}}
.rb fieldset{border:1px solid var(--line);border-radius:12px;padding:14px;margin:0 0 14px;background:#fff}
.rb legend{font-weight:700;padding:0 6px}
.rb .entry{border:1px dashed #cfd6e2;border-radius:10px;padding:12px;margin-bottom:10px;background:#fbfcfe}
.rb-preview-wrap{background:#e9edf3;border-radius:var(--radius);padding:14px}
.cv{background:#fff;color:#111;width:100%;max-width:794px;margin:0 auto;padding:34px 38px;font-size:13px;line-height:1.5;box-shadow:0 2px 10px rgba(0,0,0,.12);min-height:900px}
.cv h2{margin:0;font-size:24px;color:#111}
.cv .cv-title{font-size:14px;color:#444;margin:2px 0 6px}
.cv .cv-contact{font-size:12px;color:#444}
.cv .cv-head{display:flex;gap:18px;align-items:center;border-bottom:2px solid #222;padding-bottom:12px;margin-bottom:12px}
.cv .cv-photo{width:90px;height:110px;object-fit:cover;border-radius:4px}
.cv h3{font-size:13px;text-transform:uppercase;letter-spacing:.08em;margin:14px 0 6px;border-bottom:1px solid #ccc;padding-bottom:3px;color:#222}
.cv .cv-item{margin-bottom:8px}
.cv .cv-item-head{display:flex;justify-content:space-between;gap:10px;font-weight:700}
.cv .cv-item-sub{color:#555;font-style:italic}
.cv ul{margin:4px 0 0;padding-left:18px}
.cv .cv-skills{display:flex;flex-wrap:wrap;gap:6px}
.cv .cv-skills span{background:#f0f0f0;border-radius:4px;padding:2px 8px}
.cv.modern .cv-head{border-bottom:0;background:#0f7b6c;color:#fff;margin:-34px -38px 14px;padding:24px 38px}
.cv.modern .cv-head h2,.cv.modern .cv-title,.cv.modern .cv-contact{color:#fff}
.cv.modern h3{color:#0f7b6c;border-bottom-color:#0f7b6c}
.cv.modern .cv-skills span{background:#e6f4f1;color:#0a5e53}

/* Ads */
.ad-slot{margin:22px 0;min-height:90px;text-align:center}
.ad-slot:empty{display:none}

/* Footer */
.site-footer{background:#111827;color:#cbd2dd;padding:34px 0 22px;font-size:.92rem}
.site-footer a{color:#e5e9f0;text-decoration:none}
.site-footer a:hover{text-decoration:underline}
.footer-grid{display:grid;gap:22px;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.site-footer h4{color:#fff;margin:0 0 8px;font-size:.95rem}
.site-footer ul{list-style:none;padding:0;margin:0}
.site-footer li{margin:4px 0}
.copyright{border-top:1px solid #2a3344;margin-top:24px;padding-top:14px;color:#8d97a8;font-size:.85rem}

/* Print: only the CV */
@media print{
  @page{size:A4;margin:0}
  body{background:#fff}
  body.printing-cv main{padding:0}
  body.printing-cv main .container{max-width:none;padding:0}
  body.printing-cv main .container > :not(.rb),body.printing-cv .rb > :not(.rb-preview-wrap){display:none !important}
  body.printing-cv .rb{display:block}
  body.printing-cv .rb-preview-wrap{position:static;max-height:none;overflow:visible;padding:0;background:none}
  body.printing-cv .cv{width:210mm;max-width:none;box-shadow:none;min-height:auto;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .site-header,.site-footer,.ad-slot{display:none}
}

/* Brand + extras */
.logo em{font-style:normal;font-weight:500;color:var(--muted);margin-left:2px}
.updated{margin-top:24px}
.ur-text{font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq",serif;font-size:1.15rem;line-height:2.1}

/* Sources list (calculators) */
.sources{margin-top:18px;font-size:.9rem;color:var(--muted)}
.sources h3{font-size:.95rem;margin:0 0 4px;color:var(--text)}
.sources ul{margin:0;padding-left:18px}

/* Cropper */
.crop-wrap{background:#1f2937;border-radius:12px;padding:8px;text-align:center;margin-top:10px}
.crop-wrap canvas{max-width:100%;display:inline-block;touch-action:none}

/* Organize PDF */
.page-grid{list-style:none;padding:0;margin:16px 0 0;display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
.page-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px;text-align:center;cursor:grab}
.page-card.dragging{opacity:.4}
.page-card .thumb{height:170px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.page-card img{max-width:100%;max-height:160px;box-shadow:0 1px 4px rgba(0,0,0,.15);transition:transform .15s}
.pg-label{font-size:.85rem;font-weight:600;margin:6px 0 4px}
.pg-label small{color:var(--muted);font-weight:400}
.pg-tools{display:flex;justify-content:center;gap:4px}
.pg-tools button{border:1px solid var(--line);background:#fff;border-radius:8px;width:30px;height:30px;cursor:pointer;font:inherit}
.pg-tools button:hover{border-color:var(--brand);color:var(--brand-dark)}

/* Calculators */
.calc-group{border:1px solid var(--line);border-radius:12px;padding:12px 14px 0;margin:0 0 14px}
.calc-group legend{font-weight:700;padding:0 6px}

/* Text tools */
.big-text{min-height:220px}
.urdu-pad{min-height:200px;font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq",serif;font-size:1.35rem;line-height:2.2}
.kb{margin-top:16px;display:grid;gap:6px}
.kb-row{display:flex;gap:4px;justify-content:center}
.kb-key{flex:0 1 52px;min-width:0;height:58px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;font:inherit;padding:0 2px 3px;overflow:hidden}
.kb-key span{font-family:"Noto Nastaliq Urdu",serif;font-size:1.1rem;line-height:1.9}
.kb-key small{font-size:.65rem;color:var(--muted);line-height:1}
.kb-key.wide{flex:0 1 200px}
.kb-key:hover,.kb-key:active{border-color:var(--brand);background:var(--brand-soft)}
.qr-layout{display:grid;gap:18px;grid-template-columns:1fr}
@media (min-width:820px){.qr-layout{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}}
.qr-preview{text-align:center}
.qr-preview canvas{width:100%;max-width:300px;height:auto;image-rendering:pixelated;border:1px solid var(--line);border-radius:10px;background:#fff}
.qr-preview .actions{justify-content:center}

/* "For information only" notices */
.info-notice{background:#fff7e8;border:1px solid #f5d9a6;border-left:4px solid var(--accent);padding:12px 16px;border-radius:10px;margin:16px 0;font-size:.93rem}
.info-notice p{margin:.25em 0}
.result-note{margin:14px 0 0;padding-top:10px;border-top:1px dashed var(--line);font-size:.85rem;color:var(--muted)}
.footer-disclaimer{font-size:.82rem;color:#8d97a8;margin:20px 0 0}
.footer-disclaimer a{color:#cbd2dd;text-decoration:underline}
