:root {
  --pro-bg: #f5f8fb;
  --pro-surface: #ffffff;
  --pro-ink: #0e1f2a;
  --pro-muted: #526474;
  --pro-line: #dce6ec;
  --pro-teal: #138a7e;
  --pro-teal-dark: #0b5f58;
  --pro-blue: #265fcb;
  --pro-amber: #c46b17;
  --pro-violet: #6957c8;
  --pro-green: #23784f;
  --pro-red: #b94444;
  --pro-shadow: 0 18px 42px rgba(15, 35, 48, 0.11);
}

body {
  background:
    linear-gradient(180deg, #edf5f8 0, #f7fafc 360px),
    var(--pro-bg);
  color: var(--pro-ink);
}

.site-header {
  border-bottom: 1px solid rgba(14, 31, 42, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(15, 35, 48, 0.05);
}

.header-inner,
.wrap,
.footer-inner {
  width: min(1180px, calc(100% - 34px));
}

.header-inner {
  min-height: 72px;
}

.pro-brand {
  gap: 12px;
}

.pro-brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 8px 16px rgba(15, 35, 48, 0.15));
}

.pro-brand span {
  display: grid;
  gap: 1px;
}

.pro-brand strong {
  font-size: 1.04rem;
  line-height: 1.1;
}

.pro-brand small {
  color: var(--pro-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.nav {
  gap: 4px;
}

.nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #385164;
  font-weight: 700;
}

.nav a:hover {
  border-color: var(--pro-line);
  background: #f4f8fa;
}

.nav .nav-cta {
  background: #e8f5f3;
  color: var(--pro-teal-dark);
}

.pro-main {
  min-height: 70vh;
}

.pro-hero {
  padding: 44px 0 26px;
  border-bottom: 1px solid var(--pro-line);
}

.pro-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 28px;
  align-items: stretch;
}

.pro-hero-copy {
  display: grid;
  align-content: center;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--pro-teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pro-hero h1,
.pro-page-head h1 {
  max-width: 870px;
  margin: 0 0 12px;
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.pro-hero p,
.pro-page-head p {
  max-width: 780px;
  margin: 0;
  color: var(--pro-muted);
  font-size: 1.06rem;
}

.tool-search {
  margin-top: 24px;
  max-width: 720px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--pro-line);
  border-radius: 8px;
  background: var(--pro-surface);
  box-shadow: 0 12px 28px rgba(15, 35, 48, 0.07);
}

.tool-search input {
  width: 100%;
  min-height: 54px;
  border: 0;
  background: transparent;
  color: var(--pro-ink);
  font-size: 1rem;
  outline: 0;
}

.search-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  color: var(--pro-blue);
}

.search-icon svg {
  width: 21px;
  height: 21px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-tab {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--pro-line);
  border-radius: 8px;
  background: #fff;
  color: #41576a;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
}

.category-tab.active,
.category-tab:hover {
  border-color: rgba(19, 138, 126, 0.45);
  background: #e8f5f3;
  color: var(--pro-teal-dark);
}

.quick-panel,
.tool-meta-card,
.pro-tool-shell,
.pro-side-box {
  border: 1px solid var(--pro-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--pro-shadow);
}

.quick-panel {
  padding: 18px;
}

.quick-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pro-line);
}

.quick-panel-head strong {
  display: block;
  font-size: 1.1rem;
}

.quick-panel-head span,
.quick-list small,
.tool-meta-card small,
.pro-card small {
  color: var(--pro-muted);
  font-size: 0.84rem;
}

.quick-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.quick-list a,
.pro-side-box a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 8px;
  color: var(--pro-ink);
  text-decoration: none;
}

.quick-list a:hover,
.pro-side-box a:hover {
  background: #f4f8fa;
}

.quick-list strong,
.quick-list small {
  display: block;
}

.pro-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0 8px;
}

.pro-stats article {
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--pro-line);
  border-radius: 8px;
  background: #fff;
}

.pro-stats strong {
  display: block;
  color: var(--pro-blue);
  font-size: 1.35rem;
}

.pro-stats span {
  color: var(--pro-muted);
  font-weight: 700;
}

.section {
  padding: 30px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2,
.faq-section h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-link {
  color: var(--pro-muted);
  font-weight: 800;
  text-decoration: none;
}

.pro-directory {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pro-card {
  position: relative;
  min-height: 172px;
  padding: 16px;
  border-color: var(--pro-line);
  background:
    linear-gradient(180deg, #ffffff 0, #fbfdfe 100%);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.pro-card:hover {
  border-color: rgba(38, 95, 203, 0.45);
  box-shadow: 0 16px 34px rgba(15, 35, 48, 0.1);
}

.pro-card strong {
  font-size: 1.08rem;
  line-height: 1.2;
}

.pro-card small {
  grid-column: 2;
  width: max-content;
  max-width: 100%;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  background: #f3f7fa;
  color: #40576b;
  font-weight: 900;
}

.category-label {
  border-radius: 8px;
  background: #e9f5f3;
  color: var(--pro-teal-dark);
}

.tool-svg,
.svg-tool-icon,
.panel-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e8f5f3;
  color: var(--pro-teal);
}

.tool-svg svg,
.svg-tool-icon svg,
.panel-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.svg-tool-icon.small {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  margin-right: 0;
}

.svg-tool-icon.small svg {
  width: 17px;
  height: 17px;
}

.svg-tool-icon.heading {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(19, 138, 126, 0.22);
}

.pro-card:nth-child(4n + 2) .tool-svg,
.quick-list a:nth-child(4n + 2) .svg-tool-icon,
.pro-side-box a:nth-child(4n + 2) .svg-tool-icon {
  background: #eef2ff;
  color: var(--pro-blue);
}

.pro-card:nth-child(4n + 3) .tool-svg,
.quick-list a:nth-child(4n + 3) .svg-tool-icon,
.pro-side-box a:nth-child(4n + 3) .svg-tool-icon {
  background: #fff3e4;
  color: var(--pro-amber);
}

.pro-card:nth-child(4n + 4) .tool-svg,
.quick-list a:nth-child(4n + 4) .svg-tool-icon,
.pro-side-box a:nth-child(4n + 4) .svg-tool-icon {
  background: #f0edff;
  color: var(--pro-violet);
}

.pro-page-head {
  padding: 38px 0 24px;
  border-bottom: 1px solid var(--pro-line);
}

.tool-title-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: center;
}

.pro-page-head h1.has-heading-icon {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pro-page-head h1::before,
.pro-page-head h1.has-heading-icon::before,
.directory-card.has-card-icon::before,
.side-box a.has-link-icon::before {
  display: none;
}

.tool-meta-card {
  padding: 16px;
}

.tool-meta-card span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: 8px;
  background: #e8f5f3;
  color: var(--pro-teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-meta-card strong {
  display: block;
  margin-top: 12px;
  font-size: 1.25rem;
}

.tool-meta-card small {
  display: block;
  margin-top: 4px;
}

.pro-content-grid {
  margin-top: 24px;
}

.pro-tool-shell {
  overflow: hidden;
}

.tool-panel {
  padding: 22px;
}

.pro-upload-form {
  gap: 18px;
}

.pro-drop-zone {
  min-height: 190px;
  display: grid;
  place-items: center;
  gap: 13px;
  padding: 24px;
  border: 2px dashed #b9cbd5;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fbfdfe 0, #f3f8fa 100%);
  text-align: center;
  cursor: pointer;
}

.pro-drop-zone:hover {
  border-color: rgba(38, 95, 203, 0.5);
}

.pro-drop-zone strong {
  display: block;
  font-size: 1.18rem;
}

.pro-drop-zone small {
  display: block;
  margin-top: 4px;
  color: var(--pro-muted);
}

.pro-drop-zone input {
  max-width: 310px;
}

.button-row {
  gap: 12px;
}

.btn {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 900;
}

.btn.accent {
  background: var(--pro-teal);
  color: #fff;
}

.btn.accent:hover {
  background: var(--pro-teal-dark);
}

.btn.secondary {
  border-color: var(--pro-line);
  background: #fff;
  color: var(--pro-ink);
}

.status-line {
  color: var(--pro-muted);
  font-weight: 700;
}

.result-list {
  display: grid;
  gap: 10px;
}

.file-result {
  border-color: #bcd9cf;
  background: #f2faf7;
}

.editor-preview-panel {
  display: grid;
  gap: 16px;
}

.editor-toolbar-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid #1185e0;
  border-radius: 8px;
  overflow: hidden;
  width: max-content;
  max-width: 100%;
  background: #fff;
}

.editor-toolbar-preview span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid #1185e0;
  color: #086ec0;
  font-weight: 800;
}

.editor-toolbar-preview span:last-child {
  border-right: 0;
}

.pdf-page-preview {
  position: relative;
  min-height: 360px;
  padding: 42px;
  border: 1px solid var(--pro-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 35, 48, 0.03);
}

.pdf-title {
  position: absolute;
  top: 46px;
  right: 48px;
  font-size: 1.45rem;
  font-weight: 900;
}

.pdf-line {
  width: 62%;
  height: 10px;
  margin-top: 90px;
  border-radius: 8px;
  background: #d7e1e7;
}

.pdf-line.short {
  width: 24%;
  margin-top: 0;
}

.pdf-line.wide {
  width: 82%;
  margin-top: 16px;
}

.pdf-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 38px;
  border-top: 2px solid #1b2d38;
  padding-top: 18px;
}

.pdf-row span {
  height: 9px;
  border-radius: 8px;
  background: #d7e1e7;
}

.mini-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-tool-grid label {
  display: grid;
  gap: 7px;
  color: var(--pro-muted);
  font-weight: 900;
}

.mini-tool-grid input,
.mini-tool-grid output {
  min-height: 48px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--pro-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pro-ink);
}

.mini-tool-grid output {
  display: flex;
  align-items: center;
  font-weight: 900;
}

.browser-workspace {
  display: grid;
  gap: 16px;
}

.pro-info-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card {
  border-color: var(--pro-line);
  border-radius: 8px;
}

.faq-section {
  padding-top: 10px;
}

details {
  border-color: var(--pro-line);
}

.pro-side-box {
  padding: 16px;
}

.pro-side-box h2 {
  font-size: 1.08rem;
}

.pro-side-box a span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.seo-band {
  margin-top: 10px;
  border-top: 1px solid var(--pro-line);
  background: #ffffff;
}

.seo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
  gap: 24px;
  align-items: center;
}

.seo-grid h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  line-height: 1.18;
}

.seo-grid p {
  margin: 0;
  color: var(--pro-muted);
}

.seo-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-points span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--pro-line);
  border-radius: 8px;
  background: #f7fafc;
  font-weight: 900;
}

.simple-page {
  min-height: 48vh;
}

.tool-card-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .pro-hero-grid,
  .tool-title-grid,
  .pro-content-grid,
  .seo-grid {
    grid-template-columns: 1fr;
  }

  .pro-directory,
  .pro-info-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-meta-card {
    max-width: 360px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .pro-hero {
    padding-top: 28px;
  }

  .pro-hero h1,
  .pro-page-head h1 {
    font-size: 2.15rem;
  }

  .pro-stats,
  .pro-directory,
  .pro-info-cards,
  .mini-tool-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-title {
    position: static;
    margin-bottom: 26px;
  }

  .pdf-line {
    margin-top: 18px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .wrap,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .pro-hero h1,
  .pro-page-head h1 {
    font-size: 1.82rem;
  }

  .pro-page-head h1.has-heading-icon {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-tab,
  .nav a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .tool-search {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .tool-panel,
  .quick-panel {
    padding: 14px;
  }

  .pdf-page-preview {
    min-height: 300px;
    padding: 22px;
  }
}

/* PDF tools directory homepage */
.site-header {
  background: #fff;
  box-shadow: none;
}

.header-inner {
  min-height: 56px;
  width: min(100% - 46px, 1860px);
}

.pro-brand img {
  width: 36px;
  height: 36px;
  filter: none;
}

.pro-brand strong {
  font-size: 1.35rem;
}

.pro-brand small {
  display: none;
}

.nav {
  margin-left: 28px;
  margin-right: auto;
  gap: 24px;
}

.nav a {
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #151923;
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
}

.nav a:hover {
  background: transparent;
  color: #e5322d;
}

.nav-arrow {
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 2px solid #5f6572;
  border-bottom: 2px solid #5f6572;
  transform: translateY(-2px) rotate(45deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 900;
}

.header-actions a {
  color: #151923;
  text-decoration: none;
}

.header-actions .signup-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  background: #e5322d;
  color: #fff;
}

.apps-button {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(3, 4px);
  grid-auto-rows: 4px;
  align-content: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.apps-button span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2d2f38;
}

.pdf-tools-hero {
  padding: 34px 0 24px;
  border-bottom: 0;
  background:
    linear-gradient(120deg, rgba(245, 247, 251, 0.98), rgba(255, 247, 247, 0.88));
}

.pdf-tools-head {
  display: grid;
  justify-items: center;
  text-align: center;
}

.pdf-tools-head h1 {
  max-width: 1020px;
  margin: 0;
  color: #30313d;
  font-size: 2.7rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.pdf-tools-head p {
  max-width: 880px;
  margin: 8px 0 0;
  color: #555965;
  font-size: 1.35rem;
  line-height: 1.36;
}

.pdf-tabs {
  justify-content: center;
  margin-top: 30px;
  gap: 14px;
}

.pdf-tabs .category-tab {
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid #d5d8e1;
  border-radius: 999px;
  background: #fff;
  color: #424651;
  font-size: 0.94rem;
  font-weight: 900;
}

.pdf-tabs .category-tab.active {
  border-color: #2d2f38;
  background: #2d2f38;
  color: #fff;
}

.pdf-tabs .category-tab:hover {
  border-color: #2d2f38;
  background: #f5f6fa;
  color: #2d2f38;
}

.pdf-tabs .category-tab.active:hover {
  background: #2d2f38;
  color: #fff;
}

.tool-section {
  padding-top: 8px;
  background: #f7f7fb;
}

.ilove-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.ilove-card {
  grid-template-columns: 1fr;
  min-height: 256px;
  gap: 10px;
  padding: 32px;
  border: 1px solid #d7d9e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.ilove-card:hover {
  border-color: #b9bdca;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(24, 28, 38, 0.08);
}

.ilove-card .ilove-icon {
  grid-column: 1;
  width: 34px;
  height: 34px;
  place-self: start;
  border-radius: 5px;
  color: #fff;
  background: #e95d42;
}

.ilove-card .ilove-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.3;
}

.ilove-card .ilove-icon.organize {
  background: #e95d42;
}

.ilove-card .ilove-icon.optimize {
  background: #79af4b;
}

.ilove-card .ilove-icon.convert {
  background: #517fd1;
}

.ilove-card[href*="powerpoint"] .ilove-icon {
  background: #f36b43;
}

.ilove-card[href*="excel"] .ilove-icon {
  background: #4f9f63;
}

.ilove-card[href*="jpg"] .ilove-icon,
.ilove-card[href*="image"] .ilove-icon {
  background: #d8bd22;
}

.ilove-card .ilove-icon.edit {
  background: #ad6098;
}

.ilove-card .ilove-icon.security {
  background: #4f85b8;
}

.ilove-card .ilove-icon.more {
  background: #d8bd22;
}

.ilove-card strong,
.ilove-card > span:not(.tool-svg) {
  grid-column: 1;
}

.ilove-card strong {
  margin-top: 10px;
  color: #343640;
  font-size: 1.28rem;
  line-height: 1.15;
}

.ilove-card > span:not(.tool-svg) {
  color: #737782;
  font-size: 0.95rem;
  line-height: 1.32;
}

.tool-card-hidden {
  display: none !important;
}

@media (max-width: 1500px) {
  .ilove-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
  }

  .nav {
    margin-left: 0;
    gap: 14px;
  }

  .header-actions {
    align-self: flex-end;
  }

  .ilove-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .pdf-tools-head h1 {
    font-size: 2rem;
  }

  .pdf-tools-head p {
    font-size: 1.05rem;
  }

  .ilove-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ilove-card {
    min-height: 218px;
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    width: min(100% - 22px, 1860px);
  }

  .nav a {
    font-size: 0.82rem;
  }

  .header-actions {
    align-self: flex-start;
  }

  .ilove-grid {
    grid-template-columns: 1fr;
  }
}
