:root {
  --ink: #172026;
  --muted: #61707b;
  --line: #dbe3e8;
  --soft: #f5f8f9;
  --panel: #ffffff;
  --teal: #4f46e5;
  --teal-dark: #3730a3;
  --coral: #f97316;
  --yellow: #f2c94c;
  --blue: #315f9c;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef7f6 0, rgba(238, 247, 246, 0) 360px),
    var(--soft);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.site-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--coral));
}

.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--teal-dark);
}

main {
  padding-bottom: 48px;
}

.ad-slot {
  border: 1px dashed #aebcc6;
  background: rgba(255, 255, 255, 0.66);
  color: #72818b;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  min-height: 92px;
}

.ad-slot-top,
.ad-slot-inline {
  width: min(970px, calc(100% - 32px));
  margin: 0 auto 28px;
}

.toolkit-hero {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto 28px;
  text-align: center;
  padding: 42px 0 10px;
}

.toolkit-hero h1 {
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.toolkit-hero > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.category-filter {
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.category-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #42515a;
  padding: 0 16px;
  font-weight: 850;
  cursor: pointer;
}

.category-button.is-active,
.category-button:hover {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.home-tool-grid {
  margin-top: 26px;
  text-align: left;
}

.workspace-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(360px, 1.16fr);
  gap: 28px;
  align-items: stretch;
}

.intro-panel {
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro-panel h2 {
  max-width: 560px;
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1;
}

.intro-panel > p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.trust-row span {
  border: 1px solid var(--line);
  background: #fff;
  color: #43515a;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.converter-panel {
  background: var(--panel);
  border: 1px solid rgba(219, 227, 232, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel-heading,
.action-row,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading h2,
.section-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.reset-button {
  min-width: 76px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.reset-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.tool-switcher {
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f8;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 4px;
}

.tool-tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.tool-tab.is-active {
  background: #fff;
  color: var(--teal-dark);
  box-shadow: 0 8px 22px rgba(23, 32, 38, 0.08);
}

.drop-zone {
  min-height: 206px;
  margin-top: 20px;
  border: 2px dashed #b8c6cd;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 125, 127, 0.09), transparent 48%),
    linear-gradient(315deg, rgba(232, 102, 79, 0.1), transparent 45%),
    #fbfdfd;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.drop-zone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drop-zone.is-dragging {
  border-color: var(--teal);
  background-color: #effafa;
  transform: translateY(-1px);
}

.upload-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 1.55rem;
}

.drop-zone strong {
  font-size: 1.1rem;
}

.compact-drop-zone {
  min-height: 150px;
}

.drop-zone small,
.file-details span,
.status-message,
.faq-list p,
.steps-grid p {
  color: var(--muted);
}

.preview-area {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.preview-frame {
  width: 112px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, #e6edf1 25%, transparent 25%),
    linear-gradient(-45deg, #e6edf1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6edf1 75%),
    linear-gradient(-45deg, transparent 75%, #e6edf1 75%);
  background-size: 18px 18px;
  background-position:
    0 0,
    0 9px,
    9px -9px,
    -9px 0;
}

.preview-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.file-details p {
  margin: 0 0 6px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.control-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  color: #3d4a52;
  font-size: 0.93rem;
  font-weight: 800;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

input[type="range"] {
  accent-color: var(--teal);
}

input[type="number"],
input[type="color"] {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

input[type="color"] {
  padding: 4px;
  cursor: pointer;
}

.checkbox-field {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.tool-note {
  margin-top: 14px;
  border: 1px solid #c9dde0;
  border-radius: 8px;
  background: #f3fbfb;
  color: #42565b;
  padding: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.crop-editor {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.crop-stage {
  min-height: 220px;
  border: 1px solid #d4dde5;
  border-radius: 8px;
  background:
    linear-gradient(45deg, #eef2f5 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f5 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f5 75%),
    #fbfcfd;
  background-size: 20px 20px;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}

.crop-stage canvas {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(23, 32, 38, 0.16);
  cursor: crosshair;
  touch-action: none;
}

.rotate-editor .crop-stage canvas {
  cursor: default;
}

.watermark-editor .crop-stage canvas {
  cursor: move;
}

.remove-bg-editor .crop-stage canvas {
  cursor: default;
}

.crop-canvas-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.crop-editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.crop-mini-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.crop-mini-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.action-row {
  margin-top: 22px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--teal);
  color: #fff;
  flex: 1;
}

.primary-button:hover:not(:disabled) {
  background: var(--teal-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #9db4b7;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary-button.is-disabled {
  pointer-events: none;
  color: #93a0a8;
  background: #f3f6f8;
}

.status-message {
  min-height: 24px;
  margin: 14px 0 0;
  font-size: 0.92rem;
}

.download-button {
  width: 100%;
  margin-top: 12px;
}

.size-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.size-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
  padding: 12px;
}

.size-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.size-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.batch-summary {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #42515a;
  font-weight: 800;
}

.batch-results {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.batch-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.batch-result strong {
  display: block;
  overflow-wrap: anywhere;
}

.batch-result span {
  color: var(--muted);
  font-size: 0.84rem;
}

.batch-result a {
  min-height: 36px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-weight: 900;
}

.content-grid,
.section-block {
  width: min(1160px, calc(100% - 32px));
  margin: 34px auto 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.content-grid .section-block {
  width: auto;
  margin: 0;
}

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

.tool-card {
  min-height: 136px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  padding: 16px;
  cursor: pointer;
  position: relative;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.tool-card:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 28px rgba(20, 125, 127, 0.12);
  transform: translateY(-2px);
}

.tool-card span {
  color: var(--coral);
  font-weight: 900;
  font-size: 0.86rem;
}

.tool-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.22rem;
}

.tool-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.tool-card em {
  display: inline-flex;
  margin-top: 14px;
  border-radius: 999px;
  background: #fff4de;
  color: #7a4d00;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 900;
}

.card-link:hover {
  text-decoration: underline;
}

.featured-tool {
  border-color: rgba(20, 125, 127, 0.38);
  box-shadow: 0 12px 34px rgba(23, 32, 38, 0.07);
}

.tool-card.is-hidden {
  display: none;
}

.ad-slot-side {
  min-height: 430px;
  position: sticky;
  top: 18px;
}

.ad-slot-inline {
  margin-top: 34px;
  margin-bottom: 0;
}

.explanation-section,
.faq-section,
.content-grid,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 680px;
}

.explanation-section,
.faq-section {
  padding-top: 8px;
}

.steps-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.steps-grid article {
  border-top: 4px solid var(--teal);
  background: #fff;
  border-radius: 8px;
  padding: 18px;
}

.steps-grid article:nth-child(2) {
  border-color: var(--coral);
}

.steps-grid article:nth-child(3) {
  border-color: var(--blue);
}

.steps-grid span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 900;
}

.steps-grid h3 {
  margin: 14px 0 8px;
}

.steps-grid p {
  margin: 0;
  line-height: 1.55;
}

.faq-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details p {
  margin: 12px 0 0;
  line-height: 1.6;
}

.site-footer {
  min-height: 92px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer span {
  color: var(--ink);
  font-weight: 850;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .workspace-shell,
  .content-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    padding-top: 8px;
  }

  .ad-column {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    width: min(100% - 24px, 1160px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px 16px;
  }

  .workspace-shell,
  .content-grid,
  .section-block,
  .toolkit-hero,
  .ad-slot-top,
  .ad-slot-inline {
    width: min(100% - 24px, 1160px);
  }

  h1 {
    font-size: 2.55rem;
  }

  .converter-panel {
    padding: 16px;
  }

  .tool-switcher {
    grid-template-columns: 1fr 1fr;
  }

  .control-grid,
  .tool-grid,
  .preview-area,
  .size-summary {
    grid-template-columns: 1fr;
  }

  .preview-frame {
    width: 100%;
    max-height: 220px;
  }

  .action-row,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .secondary-button,
  .primary-button {
    width: 100%;
  }

  .crop-stage {
    min-height: 180px;
    padding: 10px;
  }

  .crop-mini-button {
    flex: 1;
  }

  .batch-summary,
  .batch-result {
    grid-template-columns: 1fr;
  }

  .batch-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 22px 0;
  }
}

/* PDF Vault Image Suite redesign */
:root {
  --pv-ink: #111827;
  --pv-body: #475569;
  --pv-border: #e5e7eb;
  --pv-soft: #f8fafc;
  --pv-panel: #ffffff;
  --pv-accent: #4f46e5;
  --pv-accent-2: #0891b2;
  --pv-warm: #f97316;
  --pv-green: #16a34a;
  --pv-shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
  --pv-shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.12);
}

body {
  color: var(--pv-ink);
  background:
    linear-gradient(180deg, rgba(79, 70, 229, 0.08), rgba(255, 255, 255, 0) 330px),
    linear-gradient(90deg, rgba(8, 145, 178, 0.08), rgba(249, 115, 22, 0.07)),
    var(--pv-soft);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000, transparent 580px);
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin-top: 12px;
  padding: 0 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--pv-shadow-sm);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 10px;
  z-index: 20;
}

.brand {
  color: var(--pv-ink);
  font-size: 1rem;
}

.brand-mark {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2));
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.24);
}

.main-nav {
  gap: 8px;
}

.main-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 11px;
  font-weight: 800;
}

.main-nav a:hover {
  color: var(--pv-accent);
  background: #eef2ff;
}

.toolkit-hero {
  width: min(1180px, calc(100% - 32px));
  margin-top: 22px;
  margin-bottom: 18px;
  display: block;
  text-align: left;
  padding: 26px 30px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.92)),
    repeating-linear-gradient(135deg, rgba(79,70,229,0.08) 0 1px, transparent 1px 13px);
  box-shadow: var(--pv-shadow-lg);
}

.toolkit-hero .eyebrow,
.toolkit-hero h1,
.toolkit-hero > p:not(.eyebrow) {
  grid-column: auto;
}

.toolkit-hero .category-filter,
.toolkit-hero .home-tool-grid {
  grid-column: auto;
}

.toolkit-hero .eyebrow {
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  padding: 8px 11px;
}

.toolkit-hero h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 3.4vw, 3.55rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.toolkit-hero > p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--pv-body);
}

.toolkit-hero > p:not(.eyebrow)::after {
  content: "Private processing | Instant download | Built for high-volume traffic";
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 20px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.35;
}

.category-filter {
  display: none;
}

.category-button {
  min-height: 34px;
  border-radius: 8px;
  background: #fff;
  font-size: 0.84rem;
}

.category-button.is-active,
.category-button:hover {
  background: var(--pv-ink);
  border-color: var(--pv-ink);
}

.toolkit-hero .home-tool-grid {
  display: none;
  margin-top: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.toolkit-hero .tool-card {
  min-height: 112px;
  padding: 14px;
  border-color: rgba(226, 232, 240, 0.96);
  background:
    linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: none;
}

.toolkit-hero .tool-card strong {
  font-size: 1rem;
}

.toolkit-hero .tool-card p {
  font-size: 0.82rem;
  line-height: 1.35;
}

.toolkit-hero .tool-card span {
  color: var(--pv-accent);
}

.toolkit-hero .tool-card:hover {
  border-color: var(--pv-accent);
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.14);
}

.ad-slot {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.92)),
    repeating-linear-gradient(45deg, rgba(15,23,42,0.04) 0 1px, transparent 1px 11px);
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
}

.ad-slot::before {
  content: "Sponsored";
  position: absolute;
  top: 9px;
  left: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 900;
}

.ad-slot-top,
.ad-slot-inline {
  width: min(1180px, calc(100% - 32px));
}

.ad-slot-top {
  display: none;
}

.workspace-shell {
  width: min(1180px, calc(100% - 32px));
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 18px;
  align-items: stretch;
}

.intro-panel {
  border: 1px solid #1e293b;
  border-radius: 8px;
  background:
    linear-gradient(160deg, #0f172a, #1e1b4b 58%, #164e63);
  color: #fff;
  padding: 24px;
  box-shadow: var(--pv-shadow-lg);
  position: sticky;
  top: 104px;
  align-self: start;
}

.intro-panel .eyebrow {
  color: #a5f3fc;
}

.intro-panel h2 {
  font-size: clamp(1.65rem, 3vw, 2.55rem);
}

.intro-panel > p:not(.eyebrow) {
  color: #cbd5e1;
  font-size: 1rem;
}

.trust-row {
  gap: 8px;
}

.trust-row span {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 8px;
  font-size: 0.78rem;
}

.intro-panel::after {
  content: "Upload -> Tune -> Export";
  display: block;
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.16);
  padding-top: 18px;
  color: #fde68a;
  font-size: 0.9rem;
  font-weight: 900;
}

.converter-panel {
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--pv-shadow-lg);
  padding: 24px;
}

.panel-heading {
  border-bottom: 1px solid var(--pv-border);
  padding-bottom: 16px;
}

.panel-heading h2 {
  font-size: 1.35rem;
}

.tool-switcher {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 0;
  background: #eef2ff;
  padding: 6px;
  gap: 6px;
}

.tool-tab {
  min-height: 38px;
  border-radius: 8px;
  color: #4338ca;
  font-size: 0.86rem;
}

.tool-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2));
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.25);
}

.drop-zone {
  border-color: #c7d2fe;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(8, 145, 178, 0.08)),
    #f8fafc;
  min-height: 230px;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--pv-accent);
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(8, 145, 178, 0.12)),
    #fff;
}

.upload-icon {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pv-accent), var(--pv-warm));
}

select,
input[type="number"],
input[type="color"],
.checkbox-field {
  border-color: #dbe3ee;
  background: #f8fafc;
}

.primary-button {
  background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2));
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.18);
}

.primary-button:hover:not(:disabled) {
  filter: brightness(0.95);
}

.primary-button:disabled {
  background: #cbd5e1;
  box-shadow: none;
}

.secondary-button:not(.is-disabled),
.batch-result a {
  border-color: #c7d2fe;
  color: #3730a3;
  background: #eef2ff;
}

.status-message {
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.content-grid,
.section-block {
  width: min(1180px, calc(100% - 32px));
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.content-grid .section-block,
.section-block {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255,255,255,0.86);
  box-shadow: var(--pv-shadow-sm);
  padding: 22px;
}

.section-heading {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 14px;
}

.section-heading h2 {
  font-size: 1.28rem;
}

.content-grid .tool-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid .tool-card {
  min-height: 92px;
  padding: 12px;
}

.content-grid .tool-card strong {
  font-size: 0.95rem;
}

.content-grid .tool-card p {
  display: none;
}

.tool-card {
  border-radius: 8px;
  border-color: #e2e8f0;
}

.tool-card:hover {
  border-color: var(--pv-accent);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.12);
}

.steps-grid article,
details {
  border: 1px solid #e2e8f0;
  border-top: 0;
  box-shadow: var(--pv-shadow-sm);
}

.steps-grid article {
  position: relative;
  overflow: hidden;
}

.steps-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--pv-accent), var(--pv-accent-2));
}

.steps-grid article:nth-child(2)::before {
  background: linear-gradient(90deg, var(--pv-warm), #facc15);
}

.steps-grid article:nth-child(3)::before {
  background: linear-gradient(90deg, var(--pv-green), var(--pv-accent-2));
}

.steps-grid article {
  border-top: 0;
}

.faq-list details[open] {
  border-color: #c7d2fe;
  background: #f8fafc;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-top: 48px;
  border-top: 0;
  border-radius: 8px 8px 0 0;
  background: #fff;
  padding: 0 18px;
}

body[data-default-tool="compress"] .intro-panel {
  background: linear-gradient(160deg, #0f172a, #312e81 60%, #0f766e);
}

body[data-default-tool="removeBg"] .intro-panel {
  background: linear-gradient(160deg, #0f172a, #164e63 58%, #166534);
}

body[data-default-tool="watermark"] .intro-panel {
  background: linear-gradient(160deg, #0f172a, #581c87 58%, #9a3412);
}

body[data-default-tool="batch"] .intro-panel {
  background: linear-gradient(160deg, #0f172a, #1e3a8a 58%, #075985);
}

@media (max-width: 1080px) {
  .toolkit-hero {
    grid-template-columns: 1fr;
  }

  .toolkit-hero .eyebrow,
  .toolkit-hero h1,
  .toolkit-hero > p:not(.eyebrow),
  .toolkit-hero .category-filter,
  .toolkit-hero .home-tool-grid {
    grid-column: 1;
  }

  .toolkit-hero .category-filter {
    margin-top: 22px;
  }

  .workspace-shell,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    margin-top: 0;
    border-radius: 0 0 8px 8px;
  }

  .toolkit-hero {
    width: min(100% - 24px, 1180px);
    padding: 24px;
  }

  .toolkit-hero .home-tool-grid,
  .content-grid .tool-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workspace-shell,
  .content-grid,
  .section-block,
  .ad-slot-top,
  .ad-slot-inline,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .tool-switcher {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .toolkit-hero .home-tool-grid,
  .content-grid .tool-grid {
    grid-template-columns: 1fr;
  }

  .toolkit-hero h1 {
    font-size: 2.3rem;
  }

  .converter-panel,
  .intro-panel,
  .content-grid .section-block,
  .section-block {
    padding: 18px;
  }
}

/* Mobile workflow optimization */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 12px;
  }

  body {
    background:
      linear-gradient(180deg, rgba(79, 70, 229, 0.1), rgba(255,255,255,0) 260px),
      var(--pv-soft);
    overflow-x: hidden;
  }

  body::before {
    display: none;
  }

  .site-header {
    width: 100%;
    min-height: auto;
    padding: 12px;
    gap: 10px;
    box-shadow: none;
  }

  .brand {
    width: 100%;
    justify-content: space-between;
  }

  .brand::after {
    content: "Image tools";
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    padding: 6px 8px;
    font-size: 0.75rem;
    font-weight: 900;
  }

  .main-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .main-nav a {
    min-height: 38px;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 6px;
    font-size: 0.78rem;
    text-align: center;
  }

  .toolkit-hero {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 18px;
    gap: 14px;
    box-shadow: var(--pv-shadow-sm);
    overflow: hidden;
  }

  .toolkit-hero .eyebrow {
    margin-bottom: 8px;
    padding: 7px 9px;
    font-size: 0.68rem;
  }

  .toolkit-hero h1 {
    max-width: 100%;
    margin-bottom: 10px;
    font-size: clamp(2rem, 11vw, 2.55rem);
    line-height: 1;
  }

  .toolkit-hero > p:not(.eyebrow) {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .toolkit-hero > p:not(.eyebrow)::after {
    margin-top: 12px;
    padding: 8px 10px;
    font-size: 0.76rem;
  }

  .category-filter {
    margin-top: 6px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .category-filter::-webkit-scrollbar,
  .toolkit-hero .home-tool-grid::-webkit-scrollbar,
  .tool-switcher::-webkit-scrollbar {
    display: none;
  }

  .category-button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .toolkit-hero .home-tool-grid,
  .content-grid .tool-grid {
    display: flex;
    grid-template-columns: none;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    gap: 10px;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .toolkit-hero .tool-card,
  .content-grid .tool-card {
    flex: 0 0 168px;
    min-height: 94px;
    scroll-snap-align: start;
  }

  .toolkit-hero .tool-card p,
  .content-grid .tool-card p,
  .toolkit-hero .card-link {
    display: none;
  }

  .toolkit-hero .tool-card strong,
  .content-grid .tool-card strong {
    font-size: 0.96rem;
    line-height: 1.2;
  }

  .toolkit-hero .tool-card span,
  .content-grid .tool-card span {
    font-size: 0.74rem;
  }

  .ad-slot-top {
    min-height: 74px;
    margin-bottom: 14px;
  }

  .workspace-shell {
    gap: 12px;
    overflow: hidden;
  }

  .intro-panel {
    padding: 16px;
  }

  .intro-panel h2 {
    margin-bottom: 8px;
    font-size: 1.35rem;
    line-height: 1.1;
  }

  .intro-panel > p:not(.eyebrow) {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .intro-panel::after {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 0.8rem;
  }

  .trust-row {
    margin-top: 10px;
  }

  .trust-row span {
    padding: 7px 8px;
    font-size: 0.72rem;
  }

  .converter-panel {
    padding: 14px;
    box-shadow: var(--pv-shadow-sm);
    min-width: 0;
    overflow: hidden;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
    padding-bottom: 12px;
  }

  .panel-heading h2 {
    font-size: 1.1rem;
    line-height: 1.2;
  }

  .panel-heading .eyebrow {
    font-size: 0.66rem;
  }

  .reset-button {
    min-width: 62px;
    height: 38px;
    font-size: 0.82rem;
  }

  .tool-switcher {
    display: flex;
    grid-template-columns: none;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding: 5px;
    gap: 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .tool-tab {
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 40px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .drop-zone {
    min-height: 154px;
    margin-top: 14px;
    padding: 16px;
    gap: 6px;
  }

  .upload-icon {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .drop-zone strong {
    font-size: 1rem;
  }

  .drop-zone small {
    font-size: 0.82rem;
  }

  .control-grid {
    margin-top: 14px;
    gap: 10px;
  }

  select,
  input[type="number"],
  input[type="color"],
  .checkbox-field {
    min-height: 44px;
    height: 44px;
  }

  .action-row {
    margin-top: 16px;
  }

  .primary-button,
  .secondary-button {
    min-height: 46px;
  }

  .status-message {
    margin-top: 10px;
    font-size: 0.84rem;
  }

  .preview-area {
    gap: 10px;
  }

  .preview-frame {
    max-height: 170px;
  }

  .size-summary {
    gap: 8px;
  }

  .size-summary div {
    padding: 10px;
  }

  .content-grid,
  .section-block {
    margin-top: 16px;
    min-width: 0;
  }

  .content-grid .section-block,
  .section-block {
    padding: 16px;
    overflow: hidden;
  }

  .section-heading {
    gap: 8px;
    padding-bottom: 10px;
    min-width: 0;
  }

  .section-heading > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .section-heading h2 {
    font-size: 1.08rem;
  }

  .ad-slot-inline {
    min-height: 74px;
    margin-top: 16px;
  }

  .steps-grid {
    gap: 10px;
  }

  .steps-grid article {
    padding: 14px;
  }

  .steps-grid h3 {
    margin: 10px 0 6px;
    font-size: 1rem;
  }

  details {
    padding: 13px 14px;
  }
}

@media (max-width: 420px) {
  .main-nav {
    grid-template-columns: 1fr 1fr;
  }

  .toolkit-hero .tool-card,
  .content-grid .tool-card {
    flex-basis: 152px;
  }

  .tool-tab {
    min-width: 86px;
  }
}

.toolkit-hero .category-filter,
.toolkit-hero .home-tool-grid,
.ad-slot-top {
  display: none;
}

.toolkit-hero {
  margin-top: 16px;
  margin-bottom: 14px;
  padding: 24px 30px;
  min-height: 0;
}

.toolkit-hero h1 {
  max-width: 780px;
  margin-bottom: 10px;
  font-size: clamp(2rem, 3.1vw, 3.4rem);
  line-height: 1.05;
}

.toolkit-hero > p:not(.eyebrow) {
  max-width: 720px;
}

.workspace-shell {
  margin-top: 0;
}

.workspace-shell .intro-panel {
  display: none;
}

.workspace-shell {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1180px;
}

.converter-panel {
  width: 100%;
}

.drop-zone {
  min-height: 190px;
}

.panel-heading {
  padding-bottom: 12px;
}

.tool-switcher {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .toolkit-hero {
    padding: 20px;
  }

  .toolkit-hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .toolkit-hero > p:not(.eyebrow) {
    font-size: 0.98rem;
    line-height: 1.55;
  }
}

body[data-focused-tool] .toolkit-hero {
  max-width: 980px;
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 30px 28px 22px;
  text-align: center;
}

body[data-focused-tool] .toolkit-hero h1,
body[data-focused-tool] .toolkit-hero > p:not(.eyebrow) {
  margin-left: auto;
  margin-right: auto;
}

body[data-focused-tool] .toolkit-hero::after {
  content: "Upload -> Choose settings -> Download";
  display: inline-flex;
  margin-top: 16px;
  padding: 8px 14px;
  border: 1px solid var(--pv-border);
  border-radius: 999px;
  background: #fff;
  color: var(--pv-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

body[data-focused-tool] .workspace-shell {
  width: min(980px, calc(100% - 32px));
}

body[data-focused-tool] .converter-panel {
  padding: 28px;
}

body[data-focused-tool] .tool-switcher {
  display: none;
}

body[data-focused-tool] .panel-heading {
  border-bottom: 0;
  padding-bottom: 0;
}

body[data-focused-tool] .panel-heading .eyebrow {
  color: var(--pv-accent);
}

body[data-focused-tool] .drop-zone {
  min-height: 310px;
  margin-top: 22px;
  border-width: 2px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.06);
}

body[data-focused-tool] .drop-zone strong {
  font-size: 1.25rem;
}

body[data-focused-tool]:not(.has-file) .converter-panel > [role="tabpanel"],
body[data-focused-tool]:not(.has-file) .preview-area,
body[data-focused-tool]:not(.has-file) .download-button,
body[data-focused-tool]:not(.has-file) .status-message {
  display: none;
}

body[data-focused-tool="batch"] #dropZone,
body[data-focused-tool="pdf"] #dropZone {
  display: none;
}

body[data-focused-tool="batch"]:not(.has-file) .converter-panel > #batchTool,
body[data-focused-tool="pdf"]:not(.has-file) .converter-panel > #pdfTool {
  display: block;
}

body[data-focused-tool].has-file .converter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 18px 22px;
  align-items: start;
}

body[data-focused-tool].has-file .panel-heading {
  grid-column: 1 / -1;
}

body[data-focused-tool].has-file .drop-zone {
  grid-column: 1;
  min-height: 94px;
  margin-top: 0;
  padding: 14px;
  place-items: start;
  justify-items: start;
  align-content: center;
  text-align: left;
}

body[data-focused-tool].has-file .drop-zone .upload-icon {
  width: 36px;
  height: 36px;
}

body[data-focused-tool].has-file .drop-zone strong {
  font-size: 1rem;
}

body[data-focused-tool].has-file .preview-area {
  grid-column: 1;
  margin-top: 0;
}

body[data-focused-tool].has-file .converter-panel > [role="tabpanel"]:not([hidden]) {
  grid-column: 2;
  grid-row: 2 / span 3;
  padding: 18px;
  border: 1px solid var(--pv-border);
  border-radius: 8px;
  background: #fff;
}

body[data-focused-tool].has-download .download-button {
  grid-column: 2;
}

body[data-focused-tool].has-file:not(.has-download) .download-button {
  display: none;
}

body[data-focused-tool].has-download .download-button:not(.is-disabled) {
  display: inline-flex;
}

body[data-focused-tool][data-default-tool="crop"].has-file .converter-panel {
  grid-template-columns: 1fr;
}

body[data-focused-tool][data-default-tool="crop"].has-file .converter-panel > * {
  grid-column: 1;
}

body[data-focused-tool][data-default-tool="crop"].has-file .converter-panel > [role="tabpanel"]:not([hidden]) {
  grid-row: auto;
}

body[data-focused-tool="batch"].has-file .converter-panel,
body[data-focused-tool="pdf"].has-file .converter-panel {
  display: block;
}

body[data-focused-tool="batch"].has-file .converter-panel > [role="tabpanel"]:not([hidden]),
body[data-focused-tool="pdf"].has-file .converter-panel > [role="tabpanel"]:not([hidden]) {
  margin-top: 18px;
}

@media (max-width: 760px) {
  body[data-focused-tool] .toolkit-hero {
    width: calc(100% - 20px);
    margin-top: 10px;
    margin-bottom: 12px;
    padding: 14px 16px;
  }

  body[data-focused-tool] .site-header {
    min-height: 72px;
  }

  body[data-focused-tool] .main-nav {
    display: none;
  }

  body[data-focused-tool] .toolkit-hero::after {
    display: none;
  }

  body[data-focused-tool] .toolkit-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  body[data-focused-tool] .toolkit-hero > p:not(.eyebrow) {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  body[data-focused-tool] .workspace-shell {
    width: calc(100% - 20px);
  }

  body[data-focused-tool] .converter-panel,
  body[data-focused-tool].has-file .converter-panel {
    display: block;
    padding: 16px;
  }

  body[data-focused-tool] .drop-zone {
    min-height: 220px;
  }

  body[data-focused-tool].has-file .drop-zone {
    min-height: 82px;
    margin-top: 14px;
  }

  body[data-focused-tool].has-file .preview-area {
    margin-top: 14px;
  }

  body[data-focused-tool].has-file .converter-panel > [role="tabpanel"]:not([hidden]) {
    margin-top: 14px;
    padding: 14px;
  }
}
