:root {
  color-scheme: light;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --ink: #07152f;
  --text: #334155;
  --muted: #64748b;
  --line: #d8e0ec;
  --line-strong: #bcc8d8;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-deep: #0b1b3f;
  --brand-soft: #e8efff;
  --accent: #7c3aed;
  --accent-soft: #efe9ff;
  --red: #f43f5e;
  --red-soft: #ffe3e9;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --green: #10b981;
  --green-soft: #dff9ef;
  --yellow: #f59e0b;
  --yellow-soft: #fff3d6;
  --purple: #7c3aed;
  --violet: #7c3aed;
  --orange: #f97316;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --max: 1780px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(124, 58, 237, 0.09), transparent 260px),
    radial-gradient(circle at 90% 6%, rgba(16, 185, 129, 0.12), transparent 280px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.88) 420px),
    var(--bg);
  font-family:
    Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100svh;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 78px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.desktop-nav,
.account-nav,
.tool-actions,
.file-row,
.inline-controls,
.download-row,
.signature-modes,
.range-pair {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 202px;
}

.brand-icon {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #fff;
  box-shadow:
    0 12px 24px rgba(37, 99, 235, 0.12),
    inset 0 0 0 1px var(--line);
}

.brand-file {
  position: relative;
  display: block;
  width: 24px;
  height: 30px;
  border: 3px solid var(--brand-deep);
  border-radius: 5px;
  background: #fff;
}

.brand-fold {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-left: 3px solid var(--brand-deep);
  border-bottom: 3px solid var(--brand-deep);
  border-radius: 0 4px 0 3px;
  background: #f8fbff;
}

.brand-shield {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 15px;
  height: 17px;
  border: 3px solid var(--brand);
  border-radius: 9px 9px 12px 12px;
  transform: translateX(-50%);
  background: #f6f8ff;
  clip-path: polygon(50% 0, 92% 18%, 88% 68%, 50% 100%, 12% 68%, 8% 18%);
}

.brand-shield::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

.brand-word {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--ink);
  font-size: 1.62rem;
  font-weight: 950;
  line-height: 1;
}

.brand-word strong {
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  font-weight: 950;
}

.brand-word em {
  margin-left: 3px;
  color: var(--muted);
  font-size: 0.72em;
  font-style: normal;
  font-weight: 800;
}

.desktop-nav {
  justify-content: center;
  gap: 24px;
  min-width: 0;
}

.desktop-nav a,
.account-nav a {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 760;
  white-space: nowrap;
}

.desktop-nav a:hover,
.account-nav a:hover {
  color: var(--brand);
}

.account-nav {
  justify-content: flex-end;
  gap: 16px;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 0.84rem;
  font-weight: 850;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  color: #fff !important;
  background: var(--gradient);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.app-grid-button {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  gap: 6px;
  width: 38px;
  height: 44px;
  padding: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.app-grid-button span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #31413b;
}

.workspace {
  position: relative;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.dashboard-section,
.tool-section {
  padding: 0;
}

.tool-section {
  display: none;
  margin: 0 0 34px;
  scroll-margin-top: 78px;
}

.tool-section.is-active {
  display: block;
}

.section-heading {
  max-width: 1680px;
  margin: 0 auto 34px;
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
}

h1 {
  font-size: clamp(3.1rem, 5.5vw, 5.6rem);
  font-weight: 950;
  letter-spacing: 0;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.64rem;
}

.section-heading p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--text);
  font-size: 1.22rem;
  line-height: 1.46;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  margin: 0 0 8px !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted) !important;
  background: transparent;
  font-size: 1.28rem !important;
  font-weight: 660;
}

.brand-hero {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(560px, 0.9fr);
  align-items: center;
  gap: 38px;
  padding: 10px 0 28px;
  border-bottom: 1px solid var(--line);
}

.brand-hero-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.hero-brand-logo {
  display: block;
  width: clamp(210px, 17vw, 280px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(75, 27, 174, 0.12));
}

.hero-logo-mark {
  display: grid;
  place-items: center;
  width: clamp(116px, 10vw, 156px);
  height: clamp(116px, 10vw, 156px);
  border-radius: 28px;
  background: #fff;
  box-shadow:
    0 24px 50px rgba(37, 99, 235, 0.12),
    inset 0 0 0 1px var(--line);
}

.hero-logo-mark .brand-file {
  width: 74px;
  height: 92px;
  border-width: 8px;
  border-radius: 12px;
}

.hero-logo-mark .brand-fold {
  top: -8px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-left-width: 8px;
  border-bottom-width: 8px;
  border-radius: 0 8px 0 8px;
}

.hero-logo-mark .brand-shield {
  bottom: 13px;
  width: 42px;
  height: 46px;
  border-width: 6px;
}

.hero-logo-mark .brand-shield::after {
  left: 10px;
  top: 15px;
  width: 16px;
  height: 9px;
  border-left-width: 5px;
  border-bottom-width: 5px;
}

.brand-hero h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
}

.brand-hero h1 strong {
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
}

.brand-hero h1 em {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.36em;
  font-style: normal;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  border-left: 1px solid var(--line);
}

.trust-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-height: 174px;
  padding: 12px 24px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.trust-card > span {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--brand-soft);
}

.trust-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.trust-card p {
  margin: 0;
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.45;
}

.trust-shield > span::before,
.trust-lock > span::before {
  content: "";
  width: 28px;
  height: 34px;
  border: 4px solid var(--purple);
  border-radius: 16px 16px 20px 20px;
  clip-path: polygon(50% 0, 94% 18%, 88% 70%, 50% 100%, 12% 70%, 6% 18%);
}

.trust-shield > span::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 8px;
  border-left: 4px solid var(--purple);
  border-bottom: 4px solid var(--purple);
  transform: rotate(-45deg);
}

.trust-code > span {
  color: var(--green);
  background: var(--green-soft);
}

.trust-code > span::before {
  content: "</>";
  width: 44px;
  height: 34px;
  border: 4px solid var(--green);
  border-radius: 8px;
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 28px;
}

.trust-gift > span {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.trust-gift > span::before {
  content: "";
  width: 35px;
  height: 35px;
  border: 4px solid var(--yellow);
  border-radius: 6px;
  box-shadow: inset 12px 0 0 transparent;
}

.trust-gift > span::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 42px;
  background: var(--yellow);
  box-shadow: 0 -11px 0 9px transparent;
}

.trust-lock > span {
  background: var(--blue-soft);
}

.trust-lock > span::before {
  width: 30px;
  height: 24px;
  border-color: var(--brand);
  border-radius: 7px;
  clip-path: none;
}

.trust-lock > span::after {
  content: "";
  position: absolute;
  top: 21px;
  width: 24px;
  height: 22px;
  border: 4px solid var(--brand);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 28px 0 34px;
}

.dashboard-controls {
  display: flex;
  justify-content: center;
  margin: 30px 0 18px;
}

.dashboard-search {
  display: grid;
  gap: 8px;
  width: min(720px, 100%);
}

.dashboard-search span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-search input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  font: inherit;
  font-weight: 700;
}

.dashboard-search input:focus {
  border-color: rgba(37, 99, 235, 0.62);
  outline: 3px solid rgba(37, 99, 235, 0.14);
}

.filter-pill {
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 820;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.filter-pill.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.dashboard-grid {
  display: block;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.tool-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 276px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.tool-card:hover,
.tool-card.is-active {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tool-card h3 {
  margin-top: 24px;
  color: var(--ink);
  font-size: 1.34rem;
  font-weight: 880;
  line-height: 1.14;
}

.tool-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
  text-wrap: auto;
}

.dashboard-empty {
  margin: 24px auto 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
  font-weight: 800;
}

.new-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 6px;
  color: #1f2b35;
  background: #dbeafe;
  font-size: 0.83rem;
  font-weight: 900;
}

.tool-icon {
  position: relative;
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.08));
}

.icon-tile {
  position: absolute;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
}

.icon-tile.small {
  width: 32px;
  height: 32px;
  font-size: 0.92rem;
}

.icon-tile.back {
  left: 0;
  top: 0;
  color: currentColor;
  opacity: 0.9;
}

.icon-tile.front {
  right: 0;
  bottom: 0;
}

.tool-icon.red {
  color: var(--red);
}

.tool-icon.red .front,
.tool-icon.red .solo {
  background: var(--red);
}

.tool-icon.red .back {
  background: var(--red-soft);
}

.tool-icon.blue {
  color: var(--brand);
}

.tool-icon.blue .front,
.tool-icon.blue .solo {
  background: var(--brand);
}

.tool-icon.blue .back {
  background: var(--blue-soft);
}

.tool-icon.green {
  color: var(--green);
}

.tool-icon.green .front,
.tool-icon.green .solo {
  background: var(--green);
}

.tool-icon.green .back {
  background: var(--green-soft);
}

.tool-icon.yellow {
  color: var(--yellow);
}

.tool-icon.yellow .front,
.tool-icon.yellow .solo {
  background: var(--yellow);
}

.tool-icon.yellow .back {
  background: var(--yellow-soft);
}

.tool-icon.purple .front,
.tool-icon.purple .solo {
  background: var(--purple);
}

.tool-icon.violet .front,
.tool-icon.violet .solo {
  background: var(--violet);
}

.tool-icon.orange .front,
.tool-icon.orange .solo {
  background: var(--orange);
}

.tool-icon .solo {
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.tool-icon .quad {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  width: 62px;
  height: 62px;
}

.tool-icon .quad span {
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: var(--green);
  font-size: 1.25rem;
  font-weight: 950;
}

.tool-icon.page-numbers .quad span {
  background: var(--purple);
  font-size: 1rem;
}

.tool-icon.organize .quad {
  grid-template-columns: 22px 22px;
  grid-template-rows: 62px 22px 22px;
  gap: 6px;
  width: 62px;
}

.tool-icon.organize .quad span:first-child {
  grid-row: 1 / 4;
  background: var(--orange);
}

.tool-icon.organize .quad span {
  background: #f4b9a7;
  font-size: 0.92rem;
}

.tool-icon.forms .solo,
.tool-icon.crop .solo,
.tool-icon.watermark .solo,
.tool-icon.page-numbers .solo,
.tool-icon.signature .solo {
  background: var(--purple);
}

.tool-icon.repair .solo,
.tool-icon.ocr .solo,
.tool-icon.compress .solo {
  background: #86bd59;
}

.tool-icon.compare .solo,
.tool-icon.redact .solo,
.tool-icon.protect .solo,
.tool-icon.unlock .solo {
  background: var(--blue);
}

.tool-icon .symbol {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 950;
}

.tool-icon .thin {
  font-size: 1.15rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.badge-strong {
  color: var(--brand);
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--brand-soft);
}

.badge-stable {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.22);
  background: var(--green-soft);
}

.badge-beta {
  color: #2b5b99;
  border-color: rgba(79, 127, 184, 0.24);
  background: #eef5ff;
}

.badge-experimental {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.28);
  background: #fff2df;
}

.tool-panel {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 26px 30px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(232, 239, 255, 0.7), rgba(255, 255, 255, 0.9) 48%, rgba(223, 249, 239, 0.52));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tool-header h2 {
  margin-top: 4px;
}

.tool-copy,
.tool-note,
.category-note,
.file-meta,
.status,
.limitation,
.empty-state,
.preview-caption {
  color: var(--muted);
  line-height: 1.55;
}

.tool-copy {
  max-width: 820px;
  margin: 10px 0 0;
}

.tool-body {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(300px, 0.58fr);
  gap: 20px;
  padding: 22px;
}

.tool-form,
.tool-output,
.preview-box,
.result-box {
  min-width: 0;
}

.tool-form {
  display: grid;
  gap: 14px;
}

.tool-output {
  display: grid;
  gap: 14px;
  align-content: start;
}

.field,
.check-field {
  display: grid;
  gap: 7px;
}

.field span,
.check-field span,
.control-label {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.check-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.check-field input {
  width: 18px;
  height: 18px;
}

.field input,
.field select,
.field textarea,
.input-like {
  width: 100%;
  min-height: 44px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: none;
}

.field input,
.field select {
  padding: 0 11px;
}

.field input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.field input[type="range"] {
  min-height: 28px;
  padding: 0;
  accent-color: var(--brand);
}

.file-drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 176px;
  padding: 24px;
  border: 1.5px dashed #a8b7ce;
  border-radius: 16px;
  background:
    radial-gradient(circle at center 44px, rgba(37, 99, 235, 0.08), transparent 58px),
    #fff;
  color: var(--ink);
  text-align: center;
  overflow: hidden;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.file-drop-prompt {
  display: grid;
  place-items: center;
  gap: 7px;
}

.file-drop-zone:hover,
.file-drop-zone:focus-within {
  border-color: var(--brand);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.file-drop-zone strong {
  font-size: 1.04rem;
  font-weight: 900;
}

.file-drop-zone small {
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 760;
}

.file-selected-state {
  display: none;
  width: min(100%, 520px);
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  text-align: left;
}

.file-drop-zone.has-files {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.44);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), #fff);
}

.file-drop-zone.has-files .file-drop-prompt {
  display: none;
}

.file-drop-zone.has-files .file-selected-state {
  display: grid;
}

.file-selected-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 0.72rem;
  font-weight: 950;
  overflow: hidden;
}

.file-selected-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.file-selected-copy strong,
.file-selected-copy small,
.file-selected-action {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-selected-copy strong {
  font-size: 0.98rem;
}

.file-selected-copy small {
  color: #526071;
  font-size: 0.84rem;
}

.file-selected-action {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 850;
}

.preview-box:empty {
  display: none;
}

.drop-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--brand-soft);
}

.drop-icon::before {
  content: "";
  width: 28px;
  height: 36px;
  border: 4px solid #fff;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.drop-icon::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-left: 4px solid var(--brand);
  border-top: 4px solid var(--brand);
  transform: translateY(8px) rotate(45deg);
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.field textarea {
  min-height: 170px;
  padding: 11px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.range-pair {
  gap: 10px;
}

.range-pair input[type="range"] {
  flex: 1 1 auto;
}

.range-value {
  width: 54px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.range-value-wide {
  width: 96px;
}

.size-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.size-preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.size-preset-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: #4f505a;
  font-weight: 850;
}

.size-preset-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.inline-controls {
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 132px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.16);
}

.button.warn {
  color: var(--red);
  border-color: rgba(244, 63, 94, 0.24);
  background: #fff1f4;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

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

.status.is-error {
  color: var(--red);
}

.status.is-success {
  color: #047857;
}

.tool-note,
.limitation {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.9rem;
}

.limitation {
  border-color: rgba(244, 63, 94, 0.18);
  background: #fff4f7;
}

.preview-box,
.result-box {
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: auto;
}

.result-box textarea {
  width: 100%;
  min-height: 260px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}

.image-result-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.image-result-grid img,
.image-result-card img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.image-result-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.image-result-card p,
.image-result-grid p {
  margin: 6px 0 0;
  color: var(--muted);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 20px;
  border: 1px dashed transparent;
  text-align: center;
}

.privacy-footer {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto 26px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--gradient);
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.18);
}

.privacy-footer > * {
  display: grid;
  gap: 3px;
  min-height: 72px;
  align-content: center;
  padding: 14px 28px;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 900;
}

.privacy-footer > *:last-child {
  border-right: 0;
}

.privacy-footer small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 500;
}

.support-link {
  text-decoration: none;
  transition: background-color 160ms ease;
}

.support-link:hover,
.support-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.doc-preview,
.html-preview {
  width: min(100%, 794px);
  min-height: 280px;
  margin: 0 auto;
  padding: 34px;
  color: #111;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.doc-preview p,
.html-preview p {
  text-wrap: auto;
}

.docx-layout-preview {
  display: grid;
  gap: 18px;
  min-width: max-content;
  padding: 4px;
}

.docx-layout-page {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  color: #111;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 10px 24px rgba(27, 29, 42, 0.08);
}

.docx-layout-text {
  position: absolute;
  display: block;
  overflow: hidden;
  white-space: pre;
  line-height: 1;
  letter-spacing: 0;
}

.docx-layout-image {
  position: absolute;
  display: block;
  object-fit: fill;
}

.table-preview {
  width: 100%;
  border-collapse: collapse;
  color: #111;
  font-size: 0.82rem;
}

.table-preview th,
.table-preview td {
  max-width: 220px;
  padding: 7px 8px;
  border: 1px solid #d5ddd8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-preview th {
  background: #eef4ff;
  font-weight: 900;
}

.canvas-wrap,
.pdf-preview-wrap,
.crop-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f4f4f8 25%, transparent 25%),
    linear-gradient(-45deg, #f4f4f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f4f4f8 75%),
    linear-gradient(-45deg, transparent 75%, #f4f4f8 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  overflow: auto;
}

.page-frame {
  position: relative;
  display: inline-block;
  max-width: calc(100% - 24px);
  margin: 12px;
  line-height: 0;
}

canvas.pdf-canvas,
canvas.signature-pad {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
}

.crop-image-preview {
  display: block;
  max-width: min(100%, 760px);
  max-height: 460px;
  width: auto;
  height: auto;
  background: #fff;
}

canvas.signature-pad {
  width: 100%;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  touch-action: none;
}

.signature-marker {
  position: absolute;
  z-index: 3;
  max-width: 80%;
  height: auto;
  border: 1px dashed rgba(37, 99, 235, 0.72);
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.crop-rect {
  position: absolute;
  z-index: 4;
  border: 2px solid var(--brand);
  background: rgba(37, 99, 235, 0.12);
  box-shadow: 0 0 0 9999px rgba(23, 33, 28, 0.28);
  pointer-events: none;
}

.signature-modes {
  gap: 8px;
}

.mode-button {
  min-width: 94px;
}

.mode-button.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.download-row,
.file-row {
  flex-wrap: wrap;
  gap: 10px;
}

.file-meta,
.preview-caption {
  margin: 0;
  font-size: 0.84rem;
}

.hidden {
  display: none !important;
}

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

  .trust-grid {
    border-left: 0;
  }

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

  .desktop-nav {
    gap: 22px;
  }
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: auto auto;
  }

  .desktop-nav {
    display: none;
  }

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

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

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

  .trust-card:nth-child(2) {
    border-right: 0;
  }

  .trust-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

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

  .privacy-footer .support-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 0 16px;
  }

  .privacy-pill:not(:first-child) {
    display: none;
  }

  .workspace {
    width: min(100% - 28px, var(--max));
    padding-top: 28px;
  }

  h1 {
    font-size: 2.4rem;
  }

  .section-heading p {
    font-size: 1.12rem;
  }

  .brand-hero-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .brand-hero-main p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-brand-logo {
    width: min(290px, 80vw);
  }

  .hero-logo-mark {
    width: 112px;
    height: 112px;
  }

  .hero-logo-mark .brand-file {
    width: 56px;
    height: 70px;
    border-width: 6px;
  }

  .hero-logo-mark .brand-fold {
    top: -6px;
    right: -6px;
    width: 23px;
    height: 23px;
    border-left-width: 6px;
    border-bottom-width: 6px;
  }

  .hero-logo-mark .brand-shield {
    width: 32px;
    height: 35px;
    border-width: 5px;
  }

  .hero-logo-mark .brand-shield::after {
    left: 8px;
    top: 11px;
    width: 12px;
    height: 7px;
    border-left-width: 4px;
    border-bottom-width: 4px;
  }

  .filter-pills {
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .dashboard-controls {
    margin-top: 22px;
  }

  .dashboard-search input {
    min-height: 50px;
  }

  .filter-pill {
    flex: 0 0 auto;
  }

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

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

  .privacy-footer {
    width: min(100% - 28px, var(--max));
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 56px;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-file {
    width: 19px;
    height: 24px;
    border-width: 2px;
  }

  .brand-fold {
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-left-width: 2px;
    border-bottom-width: 2px;
  }

  .brand-shield {
    width: 12px;
    height: 14px;
    border-width: 2px;
  }

  .brand-shield::after {
    left: 3px;
    top: 4px;
    width: 5px;
    height: 3px;
  }

  .brand-word {
    font-size: 1.18rem;
  }

  .privacy-pill {
    display: none;
  }

  .workspace {
    padding-bottom: 46px;
  }

  h1 {
    font-size: 2rem;
  }

  .brand-hero {
    gap: 22px;
  }

  .trust-grid,
  .privacy-footer {
    grid-template-columns: 1fr;
  }

  .trust-card,
  .trust-card:nth-child(2),
  .trust-card:nth-child(n + 3) {
    min-height: auto;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .trust-card:first-child {
    border-top: 0;
  }

  .privacy-footer > * {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .privacy-footer > *:last-child {
    border-bottom: 0;
  }

  .privacy-footer .support-link {
    grid-column: auto;
  }

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

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

  .tool-card {
    min-height: 230px;
    padding: 26px;
  }

  .tool-card h3 {
    font-size: 1.32rem;
  }

  .button {
    width: 100%;
    min-width: 0;
  }

  .doc-preview,
  .html-preview {
    padding: 18px;
  }
}
