/* ==========================================================================
   MZopener: plain, simple styling. One light theme, system fonts, no effects.
   ========================================================================== */
:root {
  --bg: #F6F7F9;
  --bg-2: #EEF0F4;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --field: #FFFFFF;
  --ink: #111827;
  --ink-2: #4B5563;
  --ink-3: #6B7280;
  --line: #DEE2E8;
  --line-2: #ECEEF2;
  --brand: #1D4ED8;
  --brand-2: #1E40AF;
  --brand-soft: #E8EEFF;
  --brand-ink: #FFFFFF;
  --gold: #D99A0B;
  --gold-2: #8A5E00;
  --gold-soft: #FFF6DC;
  --danger: #B42318;
  --track: #DDE1E7;
  --shadow: 0 1px 2px rgba(17, 24, 39, .06);
  --shadow-sm: none;
  --r: 8px;
  --r-lg: 12px;
  --f-display: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --f-urdu: "Noto Nastaliq Urdu", "Noto Naskh Arabic", "Jameel Noori Nastaleeq", "Segoe UI", serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.6 var(--f-body); background: var(--bg); color: var(--ink); }
[hidden]:not([hidden="until-found" i]) { display: none !important; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 8px; }
.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
main { display: block; }
.ico { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* small shared pieces */
.kicker { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.chip { display: inline-block; font-size: .72rem; font-weight: 600; background: var(--brand-soft); color: var(--ink); padding: 3px 10px; border-radius: 999px; }
.muted { color: var(--ink-2); }

/* buttons */
button, .btn {
  font: 600 .95rem/1 var(--f-body); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover { background: var(--brand-2); color: var(--brand-ink); }
button.sec, .btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
button.sec:hover, .btn-ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn-lg { min-height: 48px; padding: 0 24px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; min-height: 0; padding: 6px 2px; color: var(--brand); text-decoration: underline; font-weight: 600; font-size: .875rem; }
.link-btn:hover { background: none; color: var(--brand-2); }

/* form fields */
select, input[type=text], input[type=color], textarea, .inp {
  font: 500 1rem var(--f-body); color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: var(--r); padding: 9px 11px; min-width: 0;
}
.inp { height: 48px; width: 100%; padding: 0 11px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.inp::placeholder { color: var(--ink-3); }
.inp[aria-invalid="true"] { border-color: var(--danger); }
label { font-size: .9rem; color: var(--ink-2); }

/* header + footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo b { color: var(--brand); font-weight: 800; }
.logo:hover { color: var(--ink); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 6px; }
.nav-links a:hover { background: var(--bg-2); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.site-footer { margin-top: 48px; background: var(--surface); border-top: 1px solid var(--line); padding-top: 32px; color: var(--ink-2); font-size: .94rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.foot-brand p { margin-top: 8px; max-width: 36ch; }
.foot-bottom { margin-top: 28px; padding-block: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; font-size: .86rem; color: var(--ink-3); }

/* page heading */
.head { padding: 28px 0 8px; }
.head .container { display: grid; gap: 8px; }
.head h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
.head .lede { color: var(--ink-2); max-width: 68ch; font-size: 1.05rem; }
.back { font-size: .9rem; font-weight: 600; text-decoration: none; justify-self: start; }
.back:hover { text-decoration: underline; }
.ur-tag { font-family: var(--f-urdu); font-size: 1.1rem; color: var(--ink-2); font-weight: 400; }
.page-body { padding-block: 16px 24px; }

/* home: tool list */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tools { grid-template-columns: minmax(0, 1fr); } }
.tool { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); }
.tool:hover { border-color: var(--brand); color: var(--ink); }
.t-ic { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.t-ic .ico { width: 24px; height: 24px; }
.t-body { display: grid; gap: 4px; min-width: 0; }
.t-body strong { font-size: 1.05rem; }
.t-body span { color: var(--ink-2); font-size: .93rem; }
.partner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 22px; padding: 18px 20px; border: 1px solid var(--gold); background: var(--gold-soft); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; }
.partner:hover { color: var(--ink); }
.partner strong { display: block; font-size: 1.05rem; }
.partner span.p-text { color: var(--ink-2); font-size: .94rem; }
.help-line { margin-top: 18px; color: var(--ink-2); }

/* panels and shared tool UI */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.drop { display: grid; justify-items: center; gap: 6px; text-align: center; cursor: pointer; padding: 36px 20px; border: 2px dashed #B9C0CC; border-radius: var(--r-lg); background: var(--surface); color: var(--ink-2); }
.drop:hover { border-color: var(--brand); }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .drop-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; }
.drop .drop-ic .ico { width: 24px; height: 24px; }
.drop strong { color: var(--ink); font-size: 1.05rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.status { color: var(--ink-2); font-size: .94rem; min-height: 1.5em; }
.note { display: block; background: var(--gold-soft); border: 1px solid #EBCB7A; border-radius: var(--r); padding: 12px 16px; font-size: .94rem; margin: 14px 0; color: var(--ink); }
.checker { background-image: linear-gradient(45deg, #d8d8d8 25%, transparent 25%), linear-gradient(-45deg, #d8d8d8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d8d8d8 75%), linear-gradient(-45deg, transparent 75%, #d8d8d8 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-color: #fff; }
.preview { border: 1px solid var(--line); border-radius: var(--r); min-height: 220px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface); }
.preview img, .preview canvas { max-width: 100%; max-height: 560px; display: block; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; font-size: .78rem; cursor: pointer; }
.item .th { height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; }
.item img { max-width: 100%; max-height: 120px; }
.item .nm { word-break: break-all; margin: 6px 0; color: var(--ink-2); }
.item button { min-height: 30px; padding: 0 10px; font-size: .78rem; margin: 2px 4px 0 0; }
.ad-slot { margin: 24px 0; min-height: 90px; text-align: center; }
.ad-slot.empty { display: none; }
#oh, #eh { margin-top: 24px; font-size: 1.2rem; }
#others div, #ext div { padding: 4px 0; }
.prose { max-width: 70ch; color: var(--ink-2); }
.prose.info { max-width: none; margin-top: 28px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.prose h2 { font-size: 1.15rem; margin-bottom: 8px; color: var(--ink); }
.prose code { font-family: var(--f-mono); font-size: .86em; background: var(--bg-2); padding: 1px 6px; border-radius: 4px; }
.prose ul { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* text pages (about, contact, privacy, terms) */
.doc { max-width: 780px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 36px); }
.doc h2 { font-size: 1.25rem; margin: 26px 0 8px; }
.doc h2:first-child { margin-top: 0; }
.doc p { color: var(--ink-2); margin-top: 8px; }
.doc strong { color: var(--ink); }
.contact-box { max-width: 780px; display: grid; gap: 14px; }
.contact-box .panel { padding: 20px; display: grid; gap: 8px; justify-items: start; }
.contact-box h2 { font-size: 1.15rem; }
.contact-box p { color: var(--ink-2); }

/* ---------- AutoCAD to PDF ---------- */
.cv-status { min-height: 1.5em; margin: 0 0 14px; color: var(--ink-2); font-size: .98rem; }
.cv-status.bad { color: var(--danger); font-weight: 560; }
#cv-drop.busy { opacity: .6; pointer-events: none; }
.cv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.cv-bar strong { font-family: var(--f-display); font-weight: 560; font-size: 1.35rem; letter-spacing: -.02em; word-break: break-all; }
.cv-bar .muted { display: block; font-size: .9rem; margin-top: 2px; }
.cv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .cv-grid { grid-template-columns: minmax(0, 1fr); } }
.cv-view { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow); height: min(74vh, 700px); min-height: 360px; touch-action: none; cursor: crosshair; }
.cv-view.grab { cursor: grabbing; }
.cv-view canvas { display: block; width: 100%; height: 100%; }
.cv-zoom { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; }
.cv-zoom button { width: 40px; height: 40px; min-height: 0; padding: 0; font-size: 1.3rem; line-height: 1; background: rgba(255, 255, 255, .94); color: #0B1226; border: 1px solid #D5D2C8; border-radius: 10px; box-shadow: 0 2px 8px rgba(11, 18, 38, .14); }
.cv-zoom button:hover { background: #fff; color: #0B1226; border-color: #8a93a8; box-shadow: 0 2px 8px rgba(11, 18, 38, .2); transform: none; }
.cv-hint { position: absolute; left: 12px; bottom: 10px; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .04em; color: #6b7388; background: rgba(255, 255, 255, .88); padding: 4px 9px; border-radius: 8px; pointer-events: none; }
.cv-side { display: grid; gap: 16px; }
.cv-card { padding: 20px; display: grid; gap: 14px; }
.cv-card h2 { font-size: 1.25rem; }
.cv-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cv-opts label { display: grid; gap: 5px; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.cv-opts select { font-family: var(--f-body); font-size: .95rem; letter-spacing: 0; text-transform: none; height: 42px; padding: 0 10px; }
.cv-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.cv-actions .btn { min-height: 50px; font-size: 1rem; }
.cv-lh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.layers { display: grid; gap: 2px; max-height: 300px; overflow: auto; margin: 0 -8px; padding: 0 8px; }
.layer { display: grid; grid-template-columns: auto 14px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 9px; cursor: pointer; color: var(--ink); font-size: .92rem; }
.layer:hover { background: var(--bg-2); }
.layer input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }
.layer i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .25); }
.layer .ln { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer .lc { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-3); }
.prose ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose li::marker { color: var(--gold-2); }
.chk { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink); cursor: pointer; }
.chk input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }
