/* PDFImgTools - shared styles (variables, buttons, header, mega menu, footer, ads).
   Page-specific styles live inside each page in its <style> block. */
:root {
  --red: #e4202e;
  --red-d: #b80f1d;
  --red-l: #ffecee;
  --red-m: #ffd3d8;
  --blue: #1647d8;
  --blue-d: #0b2a8f;
  --navy: #091b52;
  --blue-l: #e9efff;
  --blue-m: #c9d7ff;
  --ink: #0f1735;
  --muted: #5a6385;
  --line: #dce1f0;
  --bg: #f2f4fa;
  --card: #fff;
  --ok: #0e9f6e;
  --r: 16px;
  --r-s: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 53, 0.05), 0 8px 28px rgba(15, 23, 53, 0.07);
  --shadow-l: 0 2px 6px rgba(15, 23, 53, 0.06), 0 20px 50px rgba(15, 23, 53, 0.12);
  --f-h: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-b: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w: 1200px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--f-b);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  max-width: 100%;
  display: block;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  color: var(--red);
}
h1,
h2,
h3,
h4 {
  font-family: var(--f-h);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 24px;
}
.ic {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: 0.18s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(228, 32, 46, 0.32);
}
.btn-red:hover {
  background: var(--red-d);
  color: #fff;
  transform: translateY(-1px);
}
.btn-blue {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 18px rgba(22, 71, 216, 0.3);
}
.btn-blue:hover {
  background: var(--blue-d);
  color: #fff;
  transform: translateY(-1px);
}
.btn-line {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-line:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.btn-ghost {
  background: transparent;
  color: var(--blue);
  padding: 10px 14px;
}
.btn-ghost:hover {
  background: var(--blue-l);
  color: var(--blue);
}
.btn-xl {
  padding: 20px 34px;
  font-size: 18px;
  border-radius: 14px;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 9px;
}
.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr .wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-h);
  font-weight: 800;
  font-size: 21px;
  color: var(--ink);
  letter-spacing: -0.04em;
  margin-right: 14px;
}
.logo:hover {
  color: var(--ink);
}
.logo b {
  color: var(--red);
}
.logo i {
  font-style: normal;
  color: var(--blue);
}
.logo svg {
  width: 34px;
  height: 34px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav > a,
.mg-btn {
  padding: 9px 13px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
}
.nav > a:hover {
  background: var(--blue-l);
  color: var(--blue);
}
.nav a.on {
  color: var(--red);
}
.mg-btn {
  background: var(--red);
  color: #fff;
  margin-right: 8px;
  padding: 9px 14px 9px 12px;
}
.mg-btn:hover,
.mg-btn.open {
  background: var(--red-d);
  color: #fff;
}
.mg-btn .ic {
  width: 18px;
  height: 18px;
}
.mg-btn .chev {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
  transition: 0.2s;
}
.mg-btn.open .chev {
  transform: rotate(-90deg);
}
.hdr .wrap {
  position: relative;
}
.hdr-r {
  display: flex;
  gap: 10px;
  align-items: center;
}
.burger {
  display: none;
  background: var(--blue-l);
  border: 0;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  color: var(--blue);
  cursor: pointer;
}
.burger .ic {
  width: 22px;
  height: 22px;
  margin: auto;
}
.tile {
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
}
.tile.r {
  background: linear-gradient(145deg, #ff5a67, var(--red));
}
.tile.b {
  background: linear-gradient(145deg, #4a7bff, var(--blue));
}
.tile.n {
  background: linear-gradient(145deg, #2c4bb0, var(--navy));
}
.tile.rl {
  background: var(--red-l);
  color: var(--red);
}
.tile.bl {
  background: var(--blue-l);
  color: var(--blue);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--red);
  height: 6px;
}
input[type="color"] {
  width: 46px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  background: #fff;
  cursor: pointer;
}
.ftr {
  background: var(--navy);
  color: #b9c6f3;
  padding: 64px 0 0;
  margin-top: 40px;
}
.ftr-g {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 34px;
}
.ftr h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.ftr a {
  color: #b9c6f3;
  display: block;
  padding: 4px 0;
  font-size: 14.5px;
}
.ftr a:hover {
  color: #fff;
}
.ftr .logo {
  color: #fff;
  margin-bottom: 14px;
}
.ftr .logo i {
  color: #7fa2ff;
}
.ftr p {
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 320px;
}
.ftr .ct a {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
}
.ftr .ct .ic {
  color: #ff8d97;
}
.ftr-b {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 44px;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  opacity: 0;
  transition: 0.25s;
  z-index: 100;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%);
}
.toast.err {
  background: var(--red);
}
@media (max-width: 1024px) {
  .ftr-g {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }
  .ftr-g {
    grid-template-columns: 1fr 1fr;
  }
  .btn-xl {
    padding: 17px 24px;
    font-size: 16px;
  }
}

[data-group] + [data-group] {
  margin-top: 52px;
}
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(9, 27, 82, 0.18);
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.18s;
  max-height: calc(100vh - 90px);
  overflow: auto;
}
.mega.open {
  opacity: 1;
  transform: none;
}
.mg-in {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: auto;
}
.hdr .mg-in {
  height: auto;
  align-items: stretch;
  display: grid;
}
.mg-rail {
  padding: 22px 22px 22px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mg-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 0 14px;
  height: 46px;
  color: var(--muted);
}
.mg-search:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px var(--blue-l);
}
.mg-search input {
  border: 0;
  background: none;
  outline: 0;
  flex: 1;
  min-width: 0;
  font: 600 14.5px var(--f-b);
  color: var(--ink);
}
.mg-search .ic {
  width: 19px;
  height: 19px;
  flex: none;
}
.mg-tabs {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mg-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  background: none;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: 0.12s;
}
.mg-tab b {
  display: block;
  font-size: 14.5px;
  line-height: 1.25;
}
.mg-tab small {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.mg-tab .tile {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: none;
}
.mg-tab .tile .ic {
  width: 19px;
  height: 19px;
}
.mg-tab:hover {
  background: var(--bg);
}
.mg-tab.on {
  background: var(--blue-l);
}
.mg-tab.on b {
  color: var(--blue);
}
.mg-main {
  padding: 22px 0 26px 28px;
  min-height: 470px;
  min-width: 0;
}
.mg-pane > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.mg-pane h3 {
  font-size: 21px;
}
.mg-pane header p {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 2px;
}
.mi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 10px;
}
.mi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  min-width: 0;
  transition: 0.12s;
}
.mi:hover {
  background: var(--blue-l);
  color: var(--ink);
}
.mi:hover .mt b {
  color: var(--blue);
}
.mi .tile {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
}
.mi .tile .ic {
  width: 20px;
  height: 20px;
}
.mt {
  min-width: 0;
  display: block;
}
.mt b {
  display: block;
  font-size: 14.5px;
  line-height: 1.3;
}
.mt small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 1px;
}
.mg-none {
  color: var(--muted);
  padding: 20px 4px;
}
.mg-bd {
  position: fixed;
  inset: 68px 0 0 0;
  background: rgba(9, 27, 82, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: 0.18s;
  z-index: -1;
}
.mg-bd.open {
  opacity: 1;
}
.hdr {
  z-index: 60;
}
.mg-bd {
  z-index: 55;
  position: fixed;
}
html.mg-open body {
  overflow: hidden;
}
.tile.r,
.tile.b,
.tile.n {
  display: grid;
  place-items: center;
  color: #fff;
}
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.drawer[hidden] {
  display: none;
}
.drawer.open {
  transform: none;
}
.dr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 64px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.dr-head .logo {
  margin: 0;
}
.dr-x {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 0;
  background: var(--bg);
  cursor: pointer;
  color: var(--ink);
}
.dr-x .ic {
  width: 22px;
  height: 22px;
  margin: auto;
}
.dr-body {
  flex: 1;
  overflow: auto;
  padding: 16px 16px 40px;
  -webkit-overflow-scrolling: touch;
}
.dr-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 6px;
}
.dr-quick a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: 14px;
  padding: 12px;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
}
.dr-quick .tile {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: none;
}
.dr-quick .tile .ic {
  width: 18px;
  height: 18px;
}
.dr-h {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 20px 4px 8px;
}
.dr-cat {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}
.dr-t {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}
.dr-t b {
  display: block;
  font-size: 15.5px;
}
.dr-t small {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.dr-t .tile {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
}
.dr-t .tile .ic {
  width: 20px;
  height: 20px;
}
.dr-t > span:nth-child(2) {
  flex: 1;
}
.dr-t .chev {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: rotate(90deg);
  transition: 0.2s;
  flex: none;
}
.dr-t[aria-expanded="true"] .chev {
  transform: rotate(-90deg);
}
.dr-cat:has(.dr-t[aria-expanded="true"]) {
  border-color: var(--blue);
}
.dr-p {
  padding: 4px 8px 10px;
  border-top: 1px solid var(--line);
}
.dr-p .mi {
  padding: 10px 8px;
}
.dr-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
  font-weight: 800;
  color: var(--blue);
  font-size: 14px;
}
.dr-all .ic {
  width: 16px;
  height: 16px;
}
.dr-links {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.dr-links a {
  flex: 1;
  text-align: center;
  padding: 13px;
  border-radius: 12px;
  background: var(--bg);
  font-weight: 800;
  color: var(--ink);
  font-size: 14px;
}
.dr-res .mi-grid {
  grid-template-columns: 1fr;
  margin-top: 12px;
}
html.dr-open body {
  overflow: hidden;
}
@media (max-width: 1180px) {
  .mg-in {
    grid-template-columns: 270px 1fr;
  }
  .mi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mg-main {
    padding-left: 20px;
  }
}
@media (min-width: 981px) {
  .drawer,
  .burger {
    display: none !important;
  }
}
@media (max-width: 980px) {
  .nav,
  .mega,
  .mg-bd {
    display: none !important;
  }
  .burger {
    display: block;
  }
  .hdr-r .btn {
    display: none;
  }
  .hdr .wrap {
    justify-content: space-between;
  }
  .logo {
    margin-right: 0;
  }
}
.ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin: 38px auto;
  overflow: hidden;
  clear: both;
}
.ad[hidden] {
  display: none;
}
.ad-l {
  font: 700 10.5px/1 var(--f-b);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
  margin-bottom: 9px;
}
.ad ins.adsbygoogle {
  display: block;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.ad ins[data-ad-status="unfilled"] {
  display: none !important;
}
.ad:has(ins[data-ad-status="unfilled"]) {
  display: none;
}
aside .ad {
  margin: 26px auto 0;
}
@media (max-width: 600px) {
  .ad {
    margin: 28px auto;
  }
}
.ads-debug .ad {
  display: flex !important;
  outline: 2px dashed var(--red);
  padding: 8px;
  min-height: 90px;
}
.ads-debug .ad ins[data-ad-status="unfilled"] {
  display: block !important;
  min-height: 40px;
  background: var(--red-l);
}
.ad-dbg {
  font: 600 12px monospace;
  color: var(--red-d);
  margin-top: 6px;
}

/* sidebar ad units are desktop only */
@media (max-width: 1024px) {
  .ad[data-desk] {
    display: none;
  }
}

/* small helper text */
.hint {
  font-size: 12.5px;
  color: var(--muted);
}
