:root {
  color-scheme: light;
  --bg: #f5f8ff;
  --surface: #ffffff;
  --ink: #07152f;
  --text: #334155;
  --muted: #64748b;
  --line: #d8e0ec;
  --line-strong: #bcc8d8;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-deep: #0b1b3f;
  --brand-soft: #eaf0ff;
  --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;
  --body-bg:
    radial-gradient(circle at 12% 18%, rgba(124, 58, 237, 0.13), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(16, 185, 129, 0.11), transparent 26%),
    radial-gradient(circle at 58% 86%, rgba(37, 99, 235, 0.09), transparent 30%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.06), transparent 34%),
    linear-gradient(220deg, rgba(16, 185, 129, 0.08), transparent 38%),
    linear-gradient(180deg, #fbfdff 0%, #f3f6ff 46%, #f8fbff 100%);
  --topbar-bg: rgba(255, 255, 255, 0.88);
  --panel-bg: rgba(255, 255, 255, 0.96);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101827;
  --surface: #1e293b;
  --ink: #f8fafc;
  --text: #dbeafe;
  --muted: #a9bbd3;
  --line: #334155;
  --line-strong: #475569;
  --brand: #818cf8;
  --brand-strong: #6366f1;
  --brand-deep: #eff6ff;
  --brand-soft: rgba(99, 102, 241, 0.18);
  --accent: #a78bfa;
  --accent-soft: rgba(124, 58, 237, 0.2);
  --red-soft: rgba(244, 63, 94, 0.16);
  --blue-soft: rgba(37, 99, 235, 0.2);
  --green-soft: rgba(16, 185, 129, 0.16);
  --yellow-soft: rgba(245, 158, 11, 0.16);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #2563eb 55%, #ec4899 100%);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.26);
  --body-bg:
    radial-gradient(circle at 16% 18%, rgba(124, 58, 237, 0.14), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(16, 185, 129, 0.1), transparent 30%),
    radial-gradient(circle at 52% 84%, rgba(37, 99, 235, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(99, 102, 241, 0.12), transparent 360px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.08), transparent 42%),
    #101827;
  --topbar-bg: rgba(15, 23, 42, 0.92);
  --panel-bg: rgba(30, 41, 59, 0.96);
  --card-bg: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--body-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: var(--topbar-bg);
  backdrop-filter: blur(18px);
}

.donation-strip {
  position: sticky;
  top: 78px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 48px;
  padding: 9px 24px;
  color: #ffffff;
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 42%, #ec4899 100%);
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.2);
}

.donation-strip-copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 0.95rem;
}

.donation-strip-copy strong {
  font-weight: 900;
}

.donation-strip-copy span:last-child {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
}

.donation-pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.16);
}

.donation-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: #4c1d95;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.donation-button:hover,
.donation-button:focus-visible {
  transform: translateY(-1px);
  outline: 3px solid rgba(255, 255, 255, 0.28);
}

.donation-button svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.6;
}

.donation-modal.hidden {
  display: none;
}

.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.donation-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 47, 0.66);
  backdrop-filter: blur(10px);
}

.donation-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(760px, calc(100svh - 36px));
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 24px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(124, 58, 237, 0.18), transparent 34%),
    radial-gradient(circle at 92% 14%, rgba(16, 185, 129, 0.14), transparent 30%),
    var(--panel-bg);
  box-shadow: 0 34px 90px rgba(7, 21, 47, 0.28);
}

.donation-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.donation-close svg {
  width: 18px;
  height: 18px;
}

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

.donation-card h2 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.donation-intro {
  max-width: 620px;
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.donation-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.donation-amounts button {
  min-width: 84px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  font-weight: 900;
}

.donation-amounts button.is-active,
.donation-amounts button:hover,
.donation-amounts button:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: var(--gradient);
}

.donation-custom.hidden {
  display: none;
}

.donation-custom {
  display: grid;
  gap: 8px;
  width: min(260px, 100%);
  margin: -4px 0 18px;
  color: var(--ink);
  font-weight: 850;
}

.donation-custom > span:first-child {
  color: var(--muted);
  font-size: 0.84rem;
}

.donation-custom-input {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.donation-custom-input strong {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--brand);
  border-right: 1px solid var(--line);
}

.donation-custom-input input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
  outline: 0;
}

.donation-methods {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.donation-method {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px 12px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
}

.donation-method:hover,
.donation-method:focus-visible,
.donation-method.is-active {
  border-color: rgba(124, 58, 237, 0.52);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.12);
}

.donation-method strong,
.donation-method small {
  grid-column: 2;
}

.donation-method strong {
  align-self: end;
  font-size: 1rem;
  font-weight: 950;
}

.donation-method small {
  color: var(--muted);
  line-height: 1.35;
}

.donation-method-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.26);
  outline-offset: 3px;
}

.donation-method-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
}

.donation-method-icon svg {
  width: 22px;
  height: 22px;
}

.donation-method-icon.upi { background: linear-gradient(135deg, #10b981, #2563eb); }
.donation-method-icon.card { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.donation-method-icon.globe { background: linear-gradient(135deg, #0ea5e9, #14b8a6); }
.donation-method-icon.crypto { background: linear-gradient(135deg, #f59e0b, #f43f5e); }

.donation-step {
  display: none;
}

.donation-step.is-active {
  display: grid;
}

.donation-tip-form {
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
}

.donation-form-head,
.donation-network-head {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.donation-form-head > div,
.donation-network-head > div {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.donation-form-head strong,
.donation-network-head strong {
  font-size: 1rem;
  font-weight: 950;
}

.donation-form-head span,
.donation-network-head span {
  color: var(--muted);
  font-size: 0.86rem;
}

.donation-secure-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  color: #047857 !important;
  background: rgba(16, 185, 129, 0.1);
  white-space: nowrap;
  font-size: 0.78rem !important;
  font-weight: 900;
}

.donation-secure-note svg {
  width: 15px;
  height: 15px;
}

.donation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.donation-fields label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.donation-fields small {
  color: var(--muted);
  font-weight: 750;
}

.donation-fields input,
.donation-fields textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  outline: 0;
}

.donation-fields input {
  min-height: 44px;
  padding: 0 12px;
}

.donation-fields textarea {
  resize: vertical;
  min-height: 84px;
  padding: 12px;
}

.donation-fields input:focus,
.donation-fields textarea:focus,
.donation-custom-input:focus-within {
  border-color: rgba(124, 58, 237, 0.62);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.donation-message-field {
  grid-column: 1 / -1;
}

.donation-network-panel {
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
}

.donation-back-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
}

.donation-back-step svg {
  width: 16px;
  height: 16px;
}

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

.donation-coins button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.donation-coins button img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.donation-coins button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donation-coins button.is-active,
.donation-coins button:hover,
.donation-coins button:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #f59e0b, #f43f5e);
  box-shadow: 0 9px 20px rgba(244, 63, 94, 0.16);
  transform: translateY(-1px);
}

.donation-wallet-panel {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.donation-qr-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.donation-qr-card img {
  display: block;
  width: min(100%, 164px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  image-rendering: pixelated;
}

.donation-qr-card figcaption {
  color: #334155;
  font-size: 0.76rem;
  font-weight: 900;
}

.donation-address-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px dashed rgba(124, 58, 237, 0.42);
  border-radius: 16px;
  background: rgba(124, 58, 237, 0.08);
}

.donation-address-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.donation-selected-network {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.donation-selected-network img {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.donation-address-card small {
  color: var(--brand);
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.donation-address-card strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.92rem;
}

.donation-network-warning {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 12px;
  color: #92400e;
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.45;
}

.donation-supported-assets {
  display: grid;
  gap: 7px;
}

.donation-supported-assets > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.donation-supported-assets > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.donation-supported-assets > div > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
}

.donation-supported-assets > div > span img,
.donation-supported-assets > div > span b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  font-size: 0.66rem;
}

.donation-address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.donation-address-actions button,
.donation-address-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.donation-address-actions svg {
  width: 15px;
  height: 15px;
  margin-right: 7px;
}

.donation-address-actions button:disabled,
.donation-address-actions a[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
  pointer-events: none;
}

.donation-submit-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.donation-paid-button.hidden {
  display: none;
}

.donation-paid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: fit-content;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #2563eb);
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.18);
}

.donation-paid-button:hover,
.donation-paid-button:focus-visible {
  transform: translateY(-1px);
  outline: 3px solid rgba(16, 185, 129, 0.2);
}

.donation-paid-button svg {
  width: 18px;
  height: 18px;
}

.donation-submit-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  width: fit-content;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--gradient);
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.18);
}

.donation-submit-note svg {
  width: 17px;
  height: 17px;
}

.donation-submit-note:disabled {
  opacity: 0.62;
  cursor: wait;
}

.donation-preview-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.08);
}

.donation-preview-panel div {
  display: grid;
  gap: 4px;
}

.donation-preview-panel span {
  color: var(--muted);
  font-size: 0.9rem;
}

.donation-preview-panel button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: var(--gradient);
  cursor: pointer;
  font-weight: 900;
}

:root[data-theme="dark"] .donation-card,
:root[data-theme="dark"] .donation-method,
:root[data-theme="dark"] .donation-amounts button {
  background-color: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .donation-custom-input {
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .donation-tip-form,
:root[data-theme="dark"] .donation-network-panel,
:root[data-theme="dark"] .donation-fields input,
:root[data-theme="dark"] .donation-fields textarea,
:root[data-theme="dark"] .donation-coins button,
:root[data-theme="dark"] .donation-address-actions button,
:root[data-theme="dark"] .donation-address-actions a,
:root[data-theme="dark"] .donation-back-step {
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .donation-secure-note {
  color: #86efac !important;
}

:root[data-theme="dark"] .donation-network-warning {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

:root[data-theme="dark"] .donation-supported-assets > div > span {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.14);
}

:root[data-theme="dark"] .donation-close {
  background: rgba(15, 23, 42, 0.76);
}

body.donation-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .donation-strip {
    top: 64px;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 8px 14px;
    text-align: center;
  }

  .donation-strip-copy {
    justify-content: center;
    width: 100%;
    font-size: 0.84rem;
  }

  .donation-strip-copy span:last-child {
    display: none;
  }

  .donation-button {
    min-height: 30px;
    padding: 0 14px;
    font-size: 0.82rem;
  }

  .donation-methods {
    grid-template-columns: 1fr;
  }

  .donation-wallet-panel {
    grid-template-columns: 1fr;
  }

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

  .donation-qr-card img {
    width: min(100%, 190px);
  }

  .donation-fields {
    grid-template-columns: 1fr;
  }

  .donation-address-actions {
    justify-content: stretch;
  }

  .donation-address-actions button,
  .donation-address-actions a {
    flex: 1 1 150px;
  }

  .donation-preview-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

.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: 232px;
}

.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: flex-start;
  gap: 24px;
  min-width: 0;
}

.desktop-nav a,
.tools-dropdown summary,
.account-nav a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 760;
  white-space: nowrap;
}

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

.desktop-nav a.is-active,
.quick-menu a.is-active,
.account-nav a.is-active {
  color: var(--brand);
}

.tools-dropdown summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
}

.tools-dropdown {
  position: static;
}

.tools-dropdown summary::-webkit-details-marker {
  display: none;
}

.dropdown-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.tools-dropdown[open] summary {
  color: var(--brand);
}

.tools-dropdown[open] .dropdown-chevron {
  transform: translateY(2px) rotate(-135deg);
}

.tools-mega-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 24px;
  right: 24px;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 20px;
  width: auto;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
  overflow: auto;
}

.tools-mega-panel::before {
  position: absolute;
  top: -7px;
  left: 42%;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
  transform: rotate(45deg);
  content: "";
}

.tools-mega-group h2 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tools-mega-group > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.tools-mega-group a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 4px 6px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: normal;
}

.tools-mega-group a:hover,
.tools-mega-group a:focus-visible {
  color: var(--brand);
  background: var(--brand-soft);
}

.tools-mega-group .tool-icon,
.tools-mega-group .tool-icon .solo {
  width: 28px;
  height: 28px;
}

.tools-mega-group .tool-icon {
  filter: none;
}

.tools-mega-group .tool-icon .solo {
  border-radius: 6px;
}

.tools-mega-group .tool-icon .symbol {
  font-size: 0.58rem;
}

.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;
}

.theme-toggle {
  display: inline-grid;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.theme-icon {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle {
  background: #17171b;
  border-color: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.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: #64748b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.app-grid-button.is-open span,
.app-grid-button:hover span {
  background: var(--brand);
}

:root[data-theme="dark"] .app-grid-button span {
  background: #7dd3fc;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.18), 0 0 12px rgba(125, 211, 252, 0.2);
}

:root[data-theme="dark"] .app-grid-button.is-open span,
:root[data-theme="dark"] .app-grid-button:hover span {
  background: #a78bfa;
}

.quick-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 28px;
  z-index: 60;
  display: none;
  width: min(300px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.quick-menu.is-open {
  display: grid;
  gap: 6px;
}

.quick-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 850;
}

.quick-menu a:hover,
.quick-menu a:focus-visible {
  background: var(--brand-soft);
  color: var(--brand);
}

.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(250px, 26vw, 430px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(75, 27, 174, 0.12));
}

.hero-compress-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 18px;
  padding: 0 24px;
  border-radius: 12px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
  font-weight: 950;
}

.hero-compress-cta:hover,
.hero-compress-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 38px rgba(37, 99, 235, 0.28);
}

.hero-compress-mobile {
  display: none;
}

.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: var(--text);
  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: var(--card-bg);
  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;
}

.section-kicker {
  display: inline-flex;
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-heading.compact {
  max-width: 860px;
  margin: 0 auto 22px;
  text-align: center;
}

.section-heading.compact h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.section-heading.compact p:not(.section-kicker) {
  margin-left: auto;
  margin-right: auto;
}

.info-page {
  display: grid;
  gap: 28px;
}

.info-hero {
  display: grid;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 46px 28px 20px;
  text-align: center;
}

.info-hero h1 {
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.98;
}

.info-hero p:not(.section-kicker) {
  max-width: 820px;
  margin: 0 auto;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.34rem);
  line-height: 1.55;
}

.info-email-link {
  justify-self: center;
  margin-top: 8px;
}

.info-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.info-highlight-card,
.info-copy-card,
.info-side-panel,
.info-side-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-bg);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.info-highlight-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 22px;
}

.info-highlight-card strong,
.info-side-panel > strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.info-highlight-card span,
.info-copy-card p,
.info-side-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
  text-wrap: auto;
}

.info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.info-copy-stack {
  display: grid;
  gap: 18px;
}

.info-copy-card {
  padding: 28px;
}

.info-copy-card h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.info-copy-card p {
  margin-top: 12px;
  font-size: 1.02rem;
}

.info-side-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
  padding: 24px;
}

.info-side-grid {
  display: grid;
  gap: 12px;
}

.info-side-grid article {
  padding: 18px;
  box-shadow: none;
}

.info-side-grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.story-band,
.review-section,
.faq-section {
  margin-top: 42px;
}

.story-band {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 28px;
  align-items: center;
  padding: 32px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.story-band h2 {
  font-size: clamp(2rem, 3.5vw, 3.35rem);
  line-height: 1.04;
}

.story-band p {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.55;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.story-grid article,
.review-card,
.faq-grid article {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.story-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
}

.story-grid strong,
.review-card strong {
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 950;
}

.story-grid span,
.review-card p,
.faq-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
  text-wrap: auto;
}

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

.review-card {
  display: grid;
  gap: 12px;
  min-height: 174px;
  padding: 24px;
}

.security-standard-section,
.docs-section {
  margin-top: 52px;
}

.security-standard-section {
  padding: 42px 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(37, 99, 235, 0.05)),
    var(--panel-bg);
  box-shadow: var(--shadow);
}

.standard-grid,
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.standard-grid article,
.docs-grid article {
  display: grid;
  gap: 12px;
  min-height: 178px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-bg);
}

.standard-badge {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient);
  font-size: 0.92rem;
  font-weight: 950;
}

.standard-grid h3,
.docs-grid h3 {
  font-size: 1.18rem;
}

.standard-grid p,
.docs-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  text-wrap: auto;
}

.review-card span {
  color: #facc15;
  font-size: 1.04rem;
  letter-spacing: 1px;
  font-weight: 950;
}

.faq-list {
  display: grid;
  gap: 14px;
  max-width: 1480px;
  margin: 0 auto;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 0 28px;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 920;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.4rem;
  font-weight: 900;
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list p {
  margin: 0;
  padding: 0 28px 24px;
  color: var(--muted);
  line-height: 1.55;
}

.review-card::before {
  content: "";
  width: 44px;
  height: 6px;
  border-radius: 999px;
  background: var(--gradient);
}

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

.faq-grid article {
  padding: 22px;
}

.faq-grid h3 {
  margin-bottom: 10px;
  font-size: 1.04rem;
  line-height: 1.2;
}

.markdown-preview {
  width: min(100%, 760px);
  min-height: 280px;
  margin: 0 auto;
  padding: 36px;
  color: #111827;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
  margin: 0 0 14px;
  color: #111827;
  line-height: 1.15;
}

.markdown-preview p,
.markdown-preview li {
  color: #334155;
  line-height: 1.55;
  text-wrap: auto;
}

.markdown-preview code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef2ff;
}

.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 {
  max-width: 54px;
  padding: 0 3px;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
}

.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, 1.05fr) minmax(340px, 0.95fr);
  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;
  min-height: 300px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.06), rgba(16, 185, 129, 0.035)),
    var(--surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.56);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.tool-output.is-processing {
  border-color: rgba(99, 102, 241, 0.36);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.1), inset 0 1px rgba(255, 255, 255, 0.56);
}

.tool-output.is-success {
  border-color: rgba(16, 185, 129, 0.42);
}

.tool-output.is-error {
  border-color: rgba(244, 63, 94, 0.38);
}

.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;
}

.file-picker-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.file-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-add-button,
.file-clear-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
}

.file-add-button {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.file-add-button:hover,
.file-add-button:focus-visible {
  filter: brightness(0.94);
}

.file-clear-button:hover,
.file-clear-button:focus-visible {
  border-color: var(--brand);
}

.file-selection-queue {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}

.file-selection-queue[hidden] {
  display: none;
}

.file-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.file-queue-item > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.file-queue-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.file-queue-item small {
  color: var(--muted);
  font-size: 0.72rem;
}

.file-queue-item button {
  flex: 0 0 auto;
  border: 0;
  color: #b42318;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  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);
}

.compress-size-summary {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.advanced-settings {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.72);
  padding: 12px;
}

.advanced-settings summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 950;
}

.advanced-settings[open] {
  background: #fff;
}

.advanced-settings .field {
  margin-top: 10px;
}

.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:empty {
  display: none;
}

.status.is-processing {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 10px;
  color: var(--brand-deep);
  background: rgba(99, 102, 241, 0.08);
}

.status.is-processing::before {
  color: var(--brand);
  font-size: 1rem;
  letter-spacing: 4px;
  content: "•••••";
  animation: render-dots 1.15s ease-in-out infinite;
}

.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;
}

.render-stage {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 260px;
  padding: 24px;
  text-align: center;
}

.render-stage strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
}

.render-stage small {
  max-width: 360px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.render-stage-visual {
  position: relative;
  display: block;
  width: 88px;
  height: 104px;
  margin-bottom: 4px;
}

.render-stage-visual::before,
.render-stage-visual::after,
.render-stage-visual i {
  position: absolute;
  width: 62px;
  height: 82px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
  content: "";
}

.render-stage-visual::before {
  left: 0;
  top: 16px;
  transform: rotate(-8deg);
}

.render-stage-visual::after {
  right: 0;
  top: 8px;
  transform: rotate(7deg);
}

.render-stage-visual i {
  left: 13px;
  top: 0;
  z-index: 2;
  overflow: hidden;
}

.render-stage-visual i::before {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 18px;
  height: 7px;
  border-radius: 999px;
  background: var(--gradient);
  box-shadow: 0 15px 0 rgba(99, 102, 241, 0.2), 0 30px 0 rgba(16, 185, 129, 0.18);
  content: "";
}

.tool-output.is-processing .render-stage-visual {
  animation: render-float 1.5s ease-in-out infinite;
}

.tool-output.is-processing .render-stage-visual i::before {
  animation: render-scan 1.15s ease-in-out infinite alternate;
}

@keyframes render-dots {
  0%, 100% { opacity: 0.28; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(3px); }
}

@keyframes render-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes render-scan {
  from { transform: translateY(0); }
  to { transform: translateY(25px); }
}

.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);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.7fr 0.9fr;
  gap: 36px;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto 26px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.site-footer,
.site-footer a {
  color: var(--muted);
}

.site-footer strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.site-footer nav,
.site-footer > div {
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-brand {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.footer-icon {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.footer-brand .footer-icon {
  grid-row: span 2;
}

.footer-brand span,
.footer-brand small,
.footer-note {
  line-height: 1.45;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--brand);
}

.pet-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
  font-family: inherit;
}

.pet-chat-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel-bg);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  font-weight: 950;
}

.pet-chat-button:hover,
.pet-chat-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.22);
}

.pet-bot {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px 16px 18px 18px;
  background: var(--gradient);
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.12);
  animation: petIdle 2.6s ease-in-out infinite, petHue 3.2s linear infinite;
  transform-origin: 50% 100%;
  --pet-eye-x: 0px;
  --pet-eye-y: 0px;
}

.pet-bot::before {
  content: "";
  position: absolute;
  top: -8px;
  width: 18px;
  height: 10px;
  border: 3px solid var(--brand);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: transparent;
}

.pet-bot::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 12px;
  width: 8px;
  height: 12px;
  border-radius: 999px;
  background: #7c3aed;
}

.pet-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 30px;
  height: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.pet-face span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  animation: petBlink 4.6s ease-in-out infinite, petEyes 5.4s ease-in-out infinite;
  transform: translate(var(--pet-eye-x), var(--pet-eye-y));
}

.pet-face span:nth-child(2) {
  animation-delay: 0.08s, 0.2s;
}

.pet-chat.is-open .pet-bot {
  animation: petDance 0.86s ease-in-out infinite, petHue 1.55s linear infinite;
}

.pet-bot.is-answering {
  animation: petAnswer 0.62s ease-in-out, petHue 1s linear infinite;
}

.pet-chat.is-open .pet-bot.pet-activity-spin {
  animation: petVibrate 0.32s ease-in-out infinite, petHue 0.65s linear infinite;
}

.pet-chat.is-open .pet-bot.pet-activity-hop {
  animation: petHop 0.58s ease-in-out infinite, petHue 0.78s linear infinite;
}

.pet-chat.is-open .pet-bot.pet-activity-wiggle {
  animation: petWiggle 0.42s ease-in-out infinite, petHue 0.72s linear infinite;
}

.pet-chat.is-open .pet-bot.pet-activity-zoom {
  animation: petZoom 0.5s ease-in-out infinite, petHue 0.62s linear infinite;
}

.pet-chat.is-open .pet-bot.pet-activity-spin::after,
.pet-chat.is-open .pet-bot.pet-activity-zoom::after {
  background: #f43f5e;
}

@keyframes petIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes petDance {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-8px) scale(1.08); }
  50% { transform: translateY(1px) scale(0.94); }
  75% { transform: translateY(-5px) scale(1.06); }
}

@keyframes petVibrate {
  0%, 100% { transform: translateX(0) scale(1); }
  18% { transform: translateX(-8px) scale(1.1); }
  36% { transform: translateX(8px) scale(1.08); }
  54% { transform: translateX(-7px) scale(1.11); }
  72% { transform: translateX(7px) scale(1.06); }
}

@keyframes petHop {
  0%, 100% { transform: translateY(0) scale(1); border-radius: 16px 16px 18px 18px; }
  28% { transform: translateY(-18px) scale(1.09); border-radius: 20px 14px 18px 16px; }
  58% { transform: translateY(2px) scale(1.15, 0.84); border-radius: 14px 20px 15px 21px; }
}

@keyframes petWiggle {
  0%, 100% { transform: translateX(0) scale(1); }
  20% { transform: translateX(-7px) scale(1.07); }
  40% { transform: translateX(7px) scale(1.08); }
  60% { transform: translateX(-6px) scale(1.05); }
  80% { transform: translateX(6px) scale(1.1); }
}

@keyframes petZoom {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(8px, -9px) scale(1.2); }
  50% { transform: translate(-7px, 3px) scale(0.9); }
  75% { transform: translate(6px, -6px) scale(1.16); }
}

@keyframes petAnswer {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-12px) scale(1.16); }
  70% { transform: translateY(1px) scale(0.9); }
}

@keyframes petHue {
  0% { filter: hue-rotate(0deg); }
  25% { filter: hue-rotate(90deg) saturate(1.3); }
  50% { filter: hue-rotate(180deg) saturate(1.55); }
  75% { filter: hue-rotate(285deg) saturate(1.35); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes petBlink {
  0%, 92%, 100% { height: 5px; }
  95% { height: 1px; }
}

@keyframes petEyes {
  0%, 100% { margin-top: 0; }
  45% { margin-top: -1px; }
  70% { margin-top: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  .pet-bot,
  .pet-chat.is-open .pet-bot,
  .pet-bot.is-answering,
  .pet-chat.is-open .pet-bot.pet-activity-spin,
  .pet-chat.is-open .pet-bot.pet-activity-hop,
  .pet-chat.is-open .pet-bot.pet-activity-wiggle,
  .pet-chat.is-open .pet-bot.pet-activity-zoom,
  .pet-face span {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

.pet-chat-panel {
  display: none;
  width: min(360px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 112px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-bg);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.pet-chat.is-open .pet-chat-panel {
  display: block;
}

.pet-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.pet-chat-head div {
  display: grid;
  gap: 2px;
}

.pet-chat-head strong,
.pet-email-form strong {
  color: var(--ink);
  font-weight: 950;
}

.pet-chat-head span,
.pet-email-form small {
  color: var(--muted);
  font-size: 0.84rem;
}

.pet-chat-head button {
  border: 0;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 8px 10px;
}

.pet-chat-messages {
  display: grid;
  gap: 10px;
  max-height: 230px;
  overflow: auto;
  padding: 14px;
}

.bot-message,
.user-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.42;
  text-wrap: auto;
}

.bot-message {
  color: var(--text);
  background: var(--brand-soft);
  white-space: pre-line;
}

.pet-message-loading {
  display: inline-flex;
  width: fit-content;
  min-width: 76px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pet-message-loading span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  animation: pet-loading-dot 1s ease-in-out infinite;
}

.pet-message-loading span:nth-child(2) { animation-delay: 0.1s; }
.pet-message-loading span:nth-child(3) { animation-delay: 0.2s; }
.pet-message-loading span:nth-child(4) { animation-delay: 0.3s; }
.pet-message-loading span:nth-child(5) { animation-delay: 0.4s; }

@keyframes pet-loading-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .pet-message-loading span { animation: none; opacity: 0.7; }
}

.pet-message-action {
  justify-self: start;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 8px;
  color: var(--brand);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 850;
}

.pet-message-action:hover,
.pet-message-action:focus-visible {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.user-message {
  justify-self: end;
  max-width: 88%;
  color: #fff;
  background: var(--gradient);
}

.pet-quick-actions {
  display: grid;
  gap: 8px;
  padding: 0 14px 12px;
}

.pet-quick-actions button {
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
  min-height: 44px;
  padding: 10px 12px;
  text-align: left;
}

.pet-quick-actions button:first-child {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
}

.pet-quick-actions button:hover,
.pet-quick-actions button:focus-visible {
  border-color: rgba(37, 99, 235, 0.34);
  color: var(--brand);
  transform: translateY(-1px);
}

.pet-quick-actions button:first-child:hover,
.pet-quick-actions button:first-child:focus-visible {
  color: #fff;
}

.pet-quick-actions.hidden {
  display: none !important;
}

.pet-chat-tools {
  display: flex;
  justify-content: flex-start;
  padding: 0 14px 12px;
}

.pet-chat-tools button {
  min-height: 36px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 950;
  padding: 0 12px;
}

.pet-chat-tools.hidden {
  display: none !important;
}

.pet-chat-input,
.pet-support-action,
.pet-email-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.pet-chat-input {
  grid-template-columns: minmax(0, 1fr) auto;
}

.pet-turnstile {
  grid-column: 1 / -1;
  max-width: 100%;
  overflow: hidden;
}

.pet-turnstile:empty {
  display: none;
}

.pet-support-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.pet-support-action button {
  min-height: 36px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  cursor: pointer;
  font-weight: 950;
  padding: 0 12px;
}

.pet-chat-input input,
.pet-email-form input,
.pet-email-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface);
  padding: 11px 12px;
  font: inherit;
}

.pet-email-form textarea {
  min-height: 84px;
  resize: vertical;
}

.pet-chat-input button,
.pet-email-form button {
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--gradient);
  cursor: pointer;
  font-weight: 950;
  padding: 0 14px;
}

.pet-chat-input button:disabled,
.pet-chat-input input:disabled {
  cursor: wait;
  opacity: 0.64;
}

.pet-email-form button {
  min-height: 44px;
}

.pet-support-action.hidden,
.pet-email-form.hidden {
  display: none !important;
}

:root[data-theme="dark"] .brand-word,
:root[data-theme="dark"] .dashboard-search span,
:root[data-theme="dark"] .field span,
:root[data-theme="dark"] .check-field span,
:root[data-theme="dark"] .control-label {
  color: var(--ink);
}

:root[data-theme="dark"] .hero-brand-logo {
  filter: drop-shadow(0 22px 30px rgba(99, 102, 241, 0.28));
}

:root[data-theme="dark"] .dashboard-search input,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .input-like,
:root[data-theme="dark"] .preview-box,
:root[data-theme="dark"] .result-box,
:root[data-theme="dark"] .tool-panel,
:root[data-theme="dark"] .file-drop-zone,
:root[data-theme="dark"] .button,
:root[data-theme="dark"] .badge {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

:root[data-theme="dark"] .tool-header {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.48), rgba(15, 23, 42, 0.92));
}

:root[data-theme="dark"] .filter-pill {
  color: var(--text);
  border-color: var(--line);
  background: rgba(30, 41, 59, 0.86);
}

:root[data-theme="dark"] .filter-pill.is-active,
:root[data-theme="dark"] .button.primary,
:root[data-theme="dark"] .mode-button.is-active {
  color: #fff;
  background: var(--gradient);
}

:root[data-theme="dark"] .file-drop-zone {
  background:
    radial-gradient(circle at center 44px, rgba(129, 140, 248, 0.14), transparent 58px),
    var(--surface);
}

:root[data-theme="dark"] .file-drop-zone.has-files {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(30, 41, 59, 0.96));
}

:root[data-theme="dark"] .file-selected-icon {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.34);
  background: #0f172a;
}

:root[data-theme="dark"] .file-selected-copy small,
:root[data-theme="dark"] .tool-copy,
:root[data-theme="dark"] .tool-note,
:root[data-theme="dark"] .category-note,
:root[data-theme="dark"] .file-meta,
:root[data-theme="dark"] .status,
:root[data-theme="dark"] .limitation,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .preview-caption {
  color: var(--muted);
}

:root[data-theme="dark"] .section-kicker {
  color: #a78bfa;
  text-shadow: none;
}

:root[data-theme="dark"] .section-heading h2,
:root[data-theme="dark"] .story-band h2,
:root[data-theme="dark"] .review-section h2 {
  color: #f8fafc;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .story-band {
  border-color: rgba(129, 140, 248, 0.24);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.94)),
    var(--surface);
}

:root[data-theme="dark"] .story-band p {
  color: #dbeafe;
}

:root[data-theme="dark"] .story-grid article,
:root[data-theme="dark"] .review-card,
:root[data-theme="dark"] .faq-grid article {
  border-color: rgba(148, 163, 184, 0.32);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.9));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .story-grid strong,
:root[data-theme="dark"] .review-card strong,
:root[data-theme="dark"] .faq-grid h3 {
  color: #ffffff;
}

:root[data-theme="dark"] .story-grid span,
:root[data-theme="dark"] .review-card p,
:root[data-theme="dark"] .faq-grid p {
  color: #cbd5e1;
}

:root[data-theme="dark"] .review-card span {
  color: #facc15;
}

:root[data-theme="dark"] .tool-note,
:root[data-theme="dark"] .limitation,
:root[data-theme="dark"] .permission-grid,
:root[data-theme="dark"] .size-preset-button,
:root[data-theme="dark"] .image-result-card,
:root[data-theme="dark"] .markdown-preview code {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .table-preview {
  color: var(--ink);
}

:root[data-theme="dark"] .table-preview th {
  background: #1e3a8a;
}

:root[data-theme="dark"] .table-preview th,
:root[data-theme="dark"] .table-preview td {
  border-color: var(--line);
}

:root[data-theme="dark"] .doc-preview,
:root[data-theme="dark"] .html-preview,
:root[data-theme="dark"] .markdown-preview,
:root[data-theme="dark"] .docx-layout-page,
:root[data-theme="dark"] canvas.pdf-canvas,
:root[data-theme="dark"] canvas.signature-pad,
:root[data-theme="dark"] .crop-image-preview {
  color: #111827;
  background: #fff;
}

:root[data-theme="dark"] .canvas-wrap,
:root[data-theme="dark"] .pdf-preview-wrap,
:root[data-theme="dark"] .crop-stage {
  border-color: var(--line);
  background:
    linear-gradient(45deg, rgba(30, 41, 59, 0.9) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(30, 41, 59, 0.9) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(30, 41, 59, 0.9) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(30, 41, 59, 0.9) 75%),
    #0f172a;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.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) {
  .tools-mega-panel {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    max-height: min(72vh, 680px);
  }

  .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: 18px;
  }

  .account-nav .privacy-pill {
    display: none;
  }
}

@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));
  }

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

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

  .story-band {
    grid-template-columns: 1fr;
  }

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

  .standard-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

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

  .info-layout {
    grid-template-columns: 1fr;
  }

  .info-side-panel {
    position: static;
  }
}

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

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

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

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

  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;
    gap: 14px;
  }

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

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

  .hero-compress-mobile {
    display: inline-flex;
    margin-top: 0;
  }

  .hero-compress-desktop {
    display: none;
  }

  .hero-kicker {
    margin-bottom: 4px !important;
    font-size: 1.02rem !important;
  }

  .brand-hero-main p:not(.hero-kicker) {
    max-width: 560px;
    font-size: 1rem;
    line-height: 1.42;
  }

  .hero-compress-cta {
    min-height: 46px;
    padding: 0 22px;
  }

  .trust-card {
    min-height: 126px;
    padding: 14px 16px;
  }

  .trust-card > span {
    width: 58px;
    height: 58px;
  }

  .trust-card h3 {
    font-size: 0.92rem;
  }

  .trust-card p {
    font-size: 0.82rem;
    line-height: 1.32;
  }

  .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));
  }

  .story-band {
    padding: 24px;
  }

  .story-grid,
  .review-grid,
  .site-footer,
  .info-highlight-grid {
    grid-template-columns: 1fr;
  }

  .info-hero {
    padding: 28px 0 6px;
  }

  .info-copy-card,
  .info-side-panel,
  .info-highlight-card {
    padding: 20px;
  }
}

@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;
  }

  .brand-word {
    display: none;
  }

  .privacy-pill {
    display: none;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .workspace {
    padding-bottom: 46px;
  }

  h1 {
    font-size: 2rem;
  }

  .brand-hero {
    gap: 12px;
    padding: 0 0 16px;
  }

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

  .hero-kicker {
    font-size: 0.92rem !important;
  }

  .brand-hero-main p:not(.hero-kicker) {
    font-size: 0.9rem;
    line-height: 1.34;
  }

  .hero-compress-cta {
    min-height: 42px;
    padding: 0 20px;
    border-radius: 11px;
    font-size: 0.96rem;
  }

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

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

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

  .trust-card:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .trust-card:first-child,
  .trust-card:nth-child(2) {
    border-top: 0;
  }

  .trust-card > span {
    width: 36px;
    height: 36px;
  }

  .trust-card h3 {
    font-size: 0.75rem;
  }

  .trust-card p {
    display: none;
  }

  .trust-shield > span::before,
  .trust-lock > span::before {
    width: 18px;
    height: 22px;
    border-width: 3px;
  }

  .trust-shield > span::after {
    width: 10px;
    height: 5px;
    border-left-width: 3px;
    border-bottom-width: 3px;
  }

  .trust-code > span::before {
    content: "</>";
    width: 28px;
    height: 22px;
    border-width: 3px;
    border-radius: 6px;
    font-size: 0.68rem;
    line-height: 16px;
  }

  .trust-gift > span::before {
    width: 22px;
    height: 22px;
    border-width: 3px;
    border-radius: 5px;
  }

  .trust-gift > span::after {
    width: 4px;
    height: 27px;
  }

  .trust-lock > span::before {
    width: 21px;
    height: 17px;
    border-radius: 5px;
  }

  .trust-lock > span::after {
    top: 10px;
    width: 17px;
    height: 15px;
    border-width: 3px;
    border-bottom: 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;
  }

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

  .security-standard-section,
  .site-footer {
    padding: 22px;
  }

  .pet-chat {
    right: 12px;
    bottom: 12px;
  }

  .pet-chat-button {
    min-height: 52px;
    padding: 7px;
  }

  .pet-chat-label {
    display: none;
  }

  .pet-chat-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 86px);
  }

  .pet-chat-messages {
    max-height: 190px;
  }

  .faq-list summary {
    min-height: 64px;
    padding: 0 18px;
    font-size: 0.98rem;
  }

  .faq-list p {
    padding: 0 18px 18px;
  }

  .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;
  }
}

/* Responsive redesign pass */
.topbar {
  width: min(var(--max), calc(100% - 24px));
  margin: 12px auto 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

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

.brand {
  min-width: clamp(168px, 16vw, 230px);
}

.desktop-nav {
  gap: clamp(12px, 1.3vw, 24px);
}

.desktop-nav a,
.account-nav a {
  font-size: clamp(0.82rem, 0.82vw, 0.94rem);
}

.brand-hero {
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: clamp(22px, 4vw, 58px);
  padding: clamp(22px, 4vw, 58px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46)),
    radial-gradient(circle at 18% 12%, rgba(124, 58, 237, 0.12), transparent 32%),
    radial-gradient(circle at 88% 76%, rgba(16, 185, 129, 0.12), transparent 34%);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.09);
}

:root[data-theme="dark"] .brand-hero {
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at 18% 12%, rgba(124, 58, 237, 0.2), transparent 32%),
    radial-gradient(circle at 88% 76%, rgba(16, 185, 129, 0.13), transparent 34%);
  border-color: rgba(148, 163, 184, 0.2);
}

.brand-hero-main {
  grid-template-columns: minmax(210px, 0.42fr) minmax(300px, 0.58fr);
  gap: clamp(18px, 3vw, 42px);
}

.hero-brand-logo {
  width: min(100%, clamp(210px, 21vw, 330px));
}

.hero-kicker {
  color: var(--brand) !important;
  font-size: clamp(0.96rem, 1.3vw, 1.24rem) !important;
  font-weight: 850;
}

.section-heading p {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
}

.trust-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-left: 0;
}

.trust-card {
  min-height: auto;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

:root[data-theme="dark"] .trust-card {
  background: rgba(15, 23, 42, 0.54);
  border-color: rgba(148, 163, 184, 0.24);
}

.dashboard-controls {
  justify-content: flex-start;
  margin: 26px 0 16px;
}

.dashboard-search {
  width: min(840px, 100%);
}

.filter-pills {
  justify-content: flex-start;
  gap: 10px;
  margin: 22px 0 28px;
}

.filter-pill {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.92rem;
}

.tool-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(14px, 1.5vw, 22px);
}

.tool-card {
  min-height: 238px;
  padding: clamp(20px, 2vw, 28px);
  border-radius: 18px;
}

.tool-card h3 {
  margin-top: 20px;
  font-size: clamp(1.08rem, 1.2vw, 1.34rem);
}

.tool-card p {
  font-size: clamp(0.88rem, 0.95vw, 0.98rem);
}

.story-band,
.security-standard-section,
.review-section,
.docs-section,
.faq-section {
  scroll-margin-top: 104px;
}

.story-band,
.security-standard-section {
  border-radius: 24px;
}

.story-band {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  padding: clamp(24px, 3.4vw, 48px);
}

.story-grid,
.standard-grid,
.docs-grid,
.review-grid {
  gap: clamp(12px, 1.5vw, 20px);
}

.review-card {
  min-height: 0;
  padding: clamp(18px, 2vw, 26px);
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 42px auto 0;
  border-radius: 26px 26px 0 0;
}

.pet-chat {
  right: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
}

@media (min-width: 1600px) {
  .tool-card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

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

  .desktop-nav {
    display: none;
  }

  .brand-hero {
    grid-template-columns: 1fr;
  }

  .brand-hero-main {
    grid-template-columns: minmax(180px, 0.42fr) minmax(0, 0.58fr);
  }

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

@media (max-width: 860px) {
  .topbar {
    min-height: 66px;
    padding: 0 14px;
  }

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

  .brand-hero {
    padding: 22px;
    border-radius: 22px;
  }

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

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

  .hero-compress-mobile {
    display: inline-flex;
    order: 3;
  }

  .hero-compress-desktop {
    display: none;
  }

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

  .trust-card {
    padding: 14px 12px;
  }

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

  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 2px 8px;
    scrollbar-width: thin;
  }

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

  .story-band,
  .info-layout {
    grid-template-columns: 1fr;
  }

  .review-grid,
  .standard-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .topbar {
    width: calc(100% - 16px);
    min-height: 58px;
    margin-top: 8px;
    gap: 8px;
    border-radius: 16px;
  }

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

  .brand {
    min-width: 0;
  }

  .brand-word,
  .privacy-pill {
    display: none;
  }

  .account-nav {
    gap: 8px;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .app-grid-button {
    width: 30px;
    height: 38px;
    gap: 4px;
    grid-template-columns: repeat(3, 4px);
  }

  .app-grid-button span {
    width: 4px;
    height: 4px;
  }

  .brand-hero {
    padding: 18px;
  }

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

  .brand-hero-main p:not(.hero-kicker) {
    font-size: 0.92rem;
  }

  .hero-compress-cta {
    width: min(100%, 260px);
  }

  .trust-grid {
    gap: 8px;
  }

  .trust-card {
    gap: 7px;
    min-height: 92px;
  }

  .trust-card > span {
    width: 40px;
    height: 40px;
  }

  .trust-card p {
    display: none;
  }

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

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

  .tool-card {
    min-height: 166px;
    border-radius: 16px;
  }

  .tool-card h3 {
    margin-top: 16px;
  }

  .story-band,
  .security-standard-section {
    padding: 20px;
    border-radius: 20px;
  }

  .story-band h2,
  .section-heading.compact h2 {
    font-size: clamp(1.55rem, 8vw, 2.2rem);
  }

  .story-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    border-radius: 22px 22px 0 0;
  }
}

/* Route-specific SEO and answer content */
.seo-breadcrumbs {
  display: flex;
  max-width: 1120px;
  margin: 0 auto 10px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.seo-breadcrumbs a {
  color: var(--brand);
  font-weight: 750;
  text-decoration: none;
}

.seo-breadcrumbs a:hover,
.seo-breadcrumbs a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.seo-direct-answer,
.seo-tool-intro-copy {
  max-width: 940px;
  margin-right: auto;
  margin-left: auto;
}

.seo-direct-answer {
  color: var(--text);
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  line-height: 1.68;
}

.seo-tool-intro-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.seo-hero-summary {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.2vw, 1.08rem);
  line-height: 1.55;
}

.seo-about-tool {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(30px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.seo-about-heading h2 {
  margin-bottom: 0;
}

.seo-about-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.seo-about-tool .seo-direct-answer,
.seo-about-copy p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.seo-about-tool .seo-direct-answer {
  color: var(--text);
}

.seo-answer-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 0;
}

.seo-answer-facts div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--card-bg) 92%, var(--brand) 8%);
}

.seo-answer-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.seo-answer-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.seo-tool-grid > section,
.seo-answer-panel,
.seo-use-cases,
.seo-faq,
.seo-related {
  min-width: 0;
}

.seo-tool-grid-support {
  padding-top: 0;
}

.seo-fact-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding-left: 21px;
  color: var(--muted);
  line-height: 1.7;
}

.seo-fact-list li::marker {
  color: var(--brand);
}

.seo-use-cases {
  padding: clamp(32px, 5vw, 58px) 0;
  border-bottom: 1px solid var(--line);
}

.seo-use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-use-case-grid li {
  min-height: 82px;
  padding: 16px 18px;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, var(--card-bg) 86%, var(--brand) 14%);
  color: var(--text);
  line-height: 1.55;
}

.seo-context-link {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.seo-context-link a {
  color: var(--brand);
  font-weight: 800;
}

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

.seo-related a {
  display: grid;
  min-height: 82px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  text-decoration: none;
}

.seo-related a:hover,
.seo-related a:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.seo-related a strong {
  color: var(--brand);
}

.seo-related a span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.4;
}

:root[data-theme="dark"] .seo-direct-answer,
:root[data-theme="dark"] .seo-use-case-grid li,
:root[data-theme="dark"] .seo-related a {
  color: #f8fafc;
}

:root[data-theme="dark"] .seo-tool-intro-copy,
:root[data-theme="dark"] .seo-hero-summary,
:root[data-theme="dark"] .seo-about-copy p,
:root[data-theme="dark"] .seo-answer-facts dt,
:root[data-theme="dark"] .seo-fact-list,
:root[data-theme="dark"] .seo-context-link,
:root[data-theme="dark"] .seo-related a span,
:root[data-theme="dark"] .seo-breadcrumbs {
  color: #cbd5e1;
}

@media (max-width: 760px) {
  .seo-breadcrumbs {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
  }

  .seo-tool-intro-copy {
    display: none;
  }

  .seo-about-tool {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 28px 0;
  }

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

  .seo-use-case-grid,
  .seo-related nav {
    grid-template-columns: 1fr;
  }

  .seo-use-case-grid li,
  .seo-related a {
    min-height: 0;
  }
}

/* Static SEO pages */
html[data-static-pages="true"] body.is-tool-open #home > .section-heading,
html[data-static-pages="true"] body.is-tool-open #dashboard,
html[data-static-pages="true"] body.is-tool-open .story-band,
html[data-static-pages="true"] body.is-tool-open .security-standard-section,
html[data-static-pages="true"] body.is-tool-open .review-section,
html[data-static-pages="true"] body.is-tool-open .docs-section,
html[data-static-pages="true"] body.is-tool-open .faq-section {
  display: none;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-intro {
  margin: 0 0 16px;
}

html[data-static-pages="true"] body.is-tool-open .workspace {
  padding-top: 18px;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero {
  padding: 12px 0 16px;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.08;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero > p:last-child {
  max-width: 1080px;
  font-size: 0.96rem;
  line-height: 1.5;
}

html[data-static-pages="true"] body.is-tool-open .tool-section {
  margin-bottom: 22px;
}

html[data-static-pages="true"] body.is-tool-open .tool-header {
  display: none;
}

html[data-static-pages="true"] body.is-tool-open .tool-header h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

html[data-static-pages="true"] body.is-tool-open .tool-copy {
  display: none;
}

html[data-static-pages="true"] body.is-tool-open .eyebrow {
  margin-bottom: 5px;
}

html[data-static-pages="true"] body.is-tool-open .tool-body {
  padding: 18px;
}

html[data-static-pages="true"] body.is-tool-open .tool-body:has(.file-drop-zone):not(:has(.file-drop-zone.has-files)) {
  grid-template-columns: 1fr;
}

html[data-static-pages="true"] body.is-tool-open .tool-body:has(.file-drop-zone):not(:has(.file-drop-zone.has-files)) .tool-output {
  display: none;
}

html[data-static-pages="true"] body.is-tool-open .file-drop-zone {
  min-height: 148px;
  padding: 18px;
}

.seo-tool-content {
  margin: 42px 0 10px;
  color: var(--text);
}

.seo-tool-hero {
  padding: clamp(26px, 4vw, 52px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.seo-tool-hero h1 {
  max-width: 900px;
  margin: 8px 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.04;
}

.seo-tool-hero > p:last-child {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.75;
}

.seo-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(32px, 6vw, 84px);
  padding: clamp(34px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--line);
}

.seo-tool-content h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
}

.seo-tool-content h3 {
  color: var(--ink);
}

.seo-steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: seo-step;
}

.seo-steps li {
  position: relative;
  min-height: 46px;
  padding-left: 58px;
  line-height: 1.65;
  counter-increment: seo-step;
}

.seo-steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand);
  font-weight: 900;
  content: counter(seo-step);
}

.seo-privacy-copy,
.seo-limit-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.seo-limit-copy {
  margin-top: 18px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.seo-faq {
  padding: clamp(34px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--line);
}

.seo-faq details {
  border-top: 1px solid var(--line);
}

.seo-faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.seo-faq summary {
  padding: 20px 2px;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.seo-faq details p {
  max-width: 860px;
  margin: 0;
  padding: 0 2px 22px;
  color: var(--muted);
  line-height: 1.7;
}

.seo-related {
  padding: clamp(30px, 4vw, 48px) 0 0;
}

.seo-related nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.seo-related a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

:root[data-theme="dark"] .seo-tool-hero h1,
:root[data-theme="dark"] .seo-tool-content h2,
:root[data-theme="dark"] .seo-tool-content h3,
:root[data-theme="dark"] .seo-faq summary {
  color: #f8fafc;
}

:root[data-theme="dark"] .seo-tool-hero > p:last-child,
:root[data-theme="dark"] .seo-privacy-copy,
:root[data-theme="dark"] .seo-limit-copy,
:root[data-theme="dark"] .seo-faq details p {
  color: #cbd5e1;
}

@media (max-width: 760px) {
  html[data-static-pages="true"] body.is-tool-open .workspace {
    padding-top: 10px;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-intro {
    margin-bottom: 12px;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero {
    padding: 8px 0 12px;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero h1 {
    font-size: 1.75rem;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero > p:last-child {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.9rem;
    line-height: 1.42;
  }

  html[data-static-pages="true"] body.is-tool-open .tool-body {
    padding: 12px;
  }

  html[data-static-pages="true"] body.is-tool-open .file-drop-zone {
    min-height: 132px;
    padding: 14px;
  }

  .seo-tool-content {
    margin-top: 28px;
  }

  .seo-tool-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .seo-tool-hero h1 {
    font-size: clamp(1.9rem, 10vw, 3rem);
  }
}

.gtm-noscript {
  position: absolute;
  width: 0;
  height: 0;
  border: 0;
  visibility: hidden;
}

/* NoLogPDF local workspace redesign */
:root {
  --max: 1480px;
  --radius: 8px;
  --body-bg:
    linear-gradient(rgba(37, 99, 235, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.025) 1px, transparent 1px),
    #f6f8fc;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --card-bg: #ffffff;
}

:root[data-theme="dark"] {
  --body-bg:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    #0f172a;
  --topbar-bg: rgba(15, 23, 42, 0.97);
  --card-bg: #172033;
}

body {
  background-size: 44px 44px;
}

.topbar {
  width: 100%;
  min-height: 68px;
  margin: 0;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.brand {
  min-width: 190px;
  gap: 10px;
}

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

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

.desktop-nav {
  gap: clamp(18px, 2vw, 32px);
}

.desktop-nav a,
.tools-dropdown summary {
  position: relative;
  font-size: 0.88rem;
  font-weight: 820;
}

.desktop-nav > a::after,
.tools-dropdown > summary::after {
  position: absolute;
  right: 0;
  bottom: -22px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
  content: "";
}

.desktop-nav > a:hover::after,
.desktop-nav > a.is-active::after,
.tools-dropdown[open] > summary::after {
  transform: scaleX(1);
}

.account-nav {
  gap: 10px;
}

.privacy-status,
.local-workspace-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.privacy-status i,
.local-workspace-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

:root[data-theme="dark"] .privacy-status,
:root[data-theme="dark"] .local-workspace-badge {
  color: #6ee7b7;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  box-shadow: none;
}

.header-cta {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 0.82rem;
}

.app-grid-button {
  height: 40px;
}

.tools-mega-panel {
  top: calc(100% + 1px);
  left: max(20px, calc((100vw - var(--max)) / 2));
  right: max(20px, calc((100vw - var(--max)) / 2));
  gap: 22px;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.tools-mega-panel::before {
  display: none;
}

.tools-mega-group h2 {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.tools-mega-group a {
  min-height: 38px;
}

.quick-menu {
  top: calc(100% + 1px);
  border-radius: 8px;
}

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

.section-heading {
  margin-bottom: 24px;
}

.brand-hero {
  grid-template-columns: minmax(0, 1.22fr) minmax(380px, 0.78fr);
  gap: clamp(28px, 4vw, 62px);
  padding: 32px 0 36px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .brand-hero {
  border-color: var(--line);
  background: transparent;
}

.brand-hero-main {
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 0.62fr);
  gap: clamp(24px, 3vw, 48px);
}

.hero-brand-lockup {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.hero-brand-logo {
  width: min(100%, 250px);
  filter: drop-shadow(0 14px 24px rgba(37, 99, 235, 0.1));
}

.local-workspace-badge {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  background: var(--green-soft);
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  margin-bottom: 10px !important;
  color: var(--brand) !important;
  font-size: 0.78rem !important;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-hero h1 {
  display: block;
  margin-bottom: 7px;
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-title {
  max-width: 740px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.35rem, 4.2vw, 4.35rem);
  font-weight: 950;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-lead {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.65;
  text-wrap: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-compress-cta,
.hero-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 900;
}

.hero-compress-cta {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.hero-secondary-cta {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.hero-secondary-cta:hover,
.hero-secondary-cta:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.hero-proof span {
  position: relative;
  padding-left: 14px;
}

.hero-proof span::before {
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

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

.trust-card {
  grid-template-columns: 46px minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  align-content: center;
  gap: 3px 12px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

:root[data-theme="dark"] .trust-card {
  border-color: var(--line);
  background: var(--surface);
}

.trust-card > span {
  grid-row: 1 / span 2;
  width: 46px;
  height: 46px;
}

.trust-card h3 {
  font-size: 0.9rem;
}

.trust-card p {
  font-size: 0.76rem;
  line-height: 1.4;
  text-wrap: auto;
}

.trust-shield > span::before,
.trust-lock > span::before {
  width: 20px;
  height: 24px;
  border-width: 3px;
}

.trust-shield > span::after {
  width: 10px;
  height: 5px;
  border-width: 0 0 3px 3px;
}

.trust-code > span::before {
  width: 32px;
  height: 25px;
  border-width: 3px;
  font-size: 0.74rem;
  line-height: 19px;
}

.trust-gift > span::before {
  width: 26px;
  height: 26px;
  border-width: 3px;
}

.trust-gift > span::after {
  width: 4px;
  height: 31px;
}

.trust-lock > span::after {
  top: 11px;
  width: 18px;
  height: 17px;
  border-width: 3px;
  border-bottom: 0;
}

.dashboard-controls {
  justify-content: space-between;
  margin-top: 24px;
}

.dashboard-search {
  width: min(760px, 100%);
}

.dashboard-search input,
.field input,
.field select,
.field textarea,
.input-like {
  border-radius: 8px;
}

.filter-pills {
  justify-content: flex-start;
  gap: 8px;
  margin: 16px 0 22px;
}

.filter-pill {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 0.84rem;
}

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

.tool-card {
  min-height: 220px;
  padding: 22px;
  border-radius: 8px;
  box-shadow: none;
}

.tool-card h3 {
  margin-top: 18px;
  font-size: 1.14rem;
}

.tool-card p {
  margin-top: 10px;
  font-size: 0.86rem;
}

.tool-panel {
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.tool-header {
  padding: 20px 24px;
  background: var(--surface);
}

.tool-body {
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  gap: 18px;
  padding: 20px;
}

.tool-output,
.preview-box,
.result-box,
.file-drop-zone,
.advanced-settings {
  border-radius: 8px;
}

.tool-output {
  min-height: 280px;
  background: var(--bg);
  box-shadow: none;
}

.file-drop-zone {
  min-height: 190px;
  border-color: rgba(37, 99, 235, 0.42);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.045), rgba(16, 185, 129, 0.045)),
    var(--surface);
}

.file-drop-zone.has-files {
  background: linear-gradient(135deg, var(--green-soft), var(--surface));
}

.drop-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
}

.button,
.file-add-button,
.file-clear-button {
  border-radius: 8px;
}

.render-stage {
  min-height: 250px;
  border: 1px dashed rgba(37, 99, 235, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.04)),
    var(--surface);
}

.story-band,
.security-standard-section,
.docs-section,
.faq-section,
.review-section {
  border-radius: 8px;
}

@media (max-width: 1260px) {
  .privacy-status {
    display: none;
  }

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

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

  .desktop-nav {
    display: flex;
  }

  .brand-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  }
}

@media (max-width: 1040px) {
  .desktop-nav {
    display: none;
  }

  .brand-hero {
    grid-template-columns: 1fr;
  }

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

  .trust-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .trust-card > span {
    grid-row: auto;
  }

  .trust-card p {
    display: none;
  }
}

@media (max-width: 820px) {
  .workspace {
    width: min(var(--max), calc(100% - 24px));
  }

  .header-cta {
    display: none;
  }

  .brand-hero-main {
    grid-template-columns: 150px minmax(0, 1fr);
    text-align: left;
  }

  .hero-brand-logo {
    width: 146px;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 3rem);
  }

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

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

@media (max-width: 600px) {
  .topbar {
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 0 12px;
    border-radius: 0;
  }

  .brand {
    gap: 7px;
  }

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

  .brand-word {
    display: inline-flex;
    font-size: 1.02rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .workspace {
    width: calc(100% - 20px);
    padding-top: 12px;
  }

  .brand-hero {
    gap: 14px;
    padding: 14px 0 18px;
  }

  .brand-hero-main {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
  }

  .hero-brand-logo {
    width: 92px;
  }

  .local-workspace-badge {
    display: none;
  }

  .hero-kicker {
    margin-bottom: 5px !important;
    font-size: 0.64rem !important;
  }

  .hero-title {
    font-size: 1.48rem;
    line-height: 1.08;
  }

  .hero-lead {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .hero-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }

  .hero-compress-cta,
  .hero-secondary-cta {
    min-height: 40px;
    width: 100%;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .hero-proof {
    display: none;
  }

  .trust-grid {
    grid-template-columns: repeat(4, minmax(76px, 1fr));
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .trust-card {
    min-height: 76px;
    padding: 8px 5px;
  }

  .trust-card > span {
    width: 34px;
    height: 34px;
  }

  .trust-card h3 {
    font-size: 0.65rem;
  }

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

  .filter-pills {
    margin: 12px 0 16px;
  }

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

  .tool-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 0 14px;
    min-height: 132px;
    padding: 17px;
  }

  .tool-card .tool-icon {
    grid-row: 1 / span 3;
  }

  .tool-card h3 {
    margin-top: 3px;
  }

  .tool-card p {
    margin-top: 7px;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero h1 {
    font-size: 1.62rem;
  }

  html[data-static-pages="true"] body.is-tool-open .tool-body {
    padding: 10px;
  }

  .file-drop-zone {
    min-height: 146px;
  }

  body.is-tool-open .tool-form > .button.primary:last-child {
    width: calc(100% - 62px);
  }
}

/* Focused directory and select-first tool experience */
:root {
  --max: 1800px;
}

body:not(.is-tool-open) .brand-hero {
  display: block;
  padding: clamp(18px, 2.5vw, 30px) 0 6px;
  border-bottom: 0;
  text-align: center;
}

body:not(.is-tool-open) .brand-hero-main {
  display: block;
}

body:not(.is-tool-open) .hero-brand-lockup,
body:not(.is-tool-open) .trust-grid,
body:not(.is-tool-open) .hero-actions,
body:not(.is-tool-open) .hero-proof {
  display: none;
}

body:not(.is-tool-open) .hero-copy {
  max-width: 980px;
  margin: 0 auto;
}

body:not(.is-tool-open) .brand-hero h1 {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink);
  font-size: clamp(2rem, 3vw, 3.15rem);
  letter-spacing: 0;
  line-height: 1.08;
  text-align: center;
  text-transform: none;
}

body:not(.is-tool-open) .hero-lead {
  max-width: 720px;
  margin: 10px auto 0;
  font-size: clamp(0.98rem, 1vw, 1.08rem);
  line-height: 1.42;
}

body:not(.is-tool-open) .dashboard-controls {
  margin-top: 10px;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
}

body:not(.is-tool-open) .dashboard-search {
  width: min(740px, 100%);
  margin-left: 0;
  margin-right: auto;
}

body:not(.is-tool-open) .filter-pills {
  justify-content: flex-start;
  margin: 14px 0 24px;
}

body:not(.is-tool-open) .filter-pill {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
}

body:not(.is-tool-open) .tool-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

body:not(.is-tool-open) .tool-card {
  min-height: 282px;
  padding: 30px;
  border-radius: 8px;
}

body:not(.is-tool-open) .tool-card h3 {
  margin-top: 24px;
  font-size: 1.35rem;
}

body:not(.is-tool-open) .tool-card p {
  margin-top: 14px;
  font-size: 0.96rem;
  line-height: 1.52;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-intro {
  margin-bottom: 0;
  text-align: center;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero {
  padding: clamp(34px, 5vw, 58px) 0 24px;
  border: 0;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero h1 {
  margin: 6px auto 12px;
  font-size: clamp(2.4rem, 4vw, 4rem);
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero > p {
  margin-right: auto;
  margin-left: auto;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero > p:last-child {
  max-width: 900px;
  font-size: clamp(1rem, 1.25vw, 1.22rem);
}

body.is-tool-open .tool-panel:has(.file-drop-zone:not(.has-files)) {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) {
  display: block;
  min-height: clamp(400px, 48vh, 580px);
  padding: 22px 0 80px;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(920px, 100%);
  margin: 0 auto;
  place-content: start stretch;
  gap: 14px 16px;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-field > span:first-child,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-picker-note,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-picker-actions,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-selection-queue,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-output,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-form > .button.primary:last-child {
  display: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-field,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .advanced-settings,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .permission-grid,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .field:has(textarea),
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-note,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .limitation,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .compress-size-summary {
  grid-column: 1 / -1;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-form > .field:not(.file-drop-field) {
  align-content: start;
  min-width: 0;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .range-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .range-value-wide {
  width: auto;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: left;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .compress-size-summary {
  display: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-form:has(> .field:not(.file-drop-field)) .file-drop-field::after,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-form:has(> .advanced-settings) .file-drop-field::after {
  display: block;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  content: "Options";
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-zone {
  min-height: 170px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-zone:hover,
body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-zone:focus-within {
  box-shadow: none;
  transform: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt {
  display: grid;
  width: min(100%, 520px);
  margin: 0 auto;
  gap: 16px;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .drop-icon {
  display: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt strong {
  display: grid;
  place-items: center;
  min-height: 104px;
  padding: 18px 28px;
  border-radius: 8px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.15;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt small {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

body.is-tool-open .file-drop-zone.has-files {
  min-height: 168px;
}

@media (max-width: 1500px) {
  body:not(.is-tool-open) .tool-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  body:not(.is-tool-open) .tool-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body:not(.is-tool-open) .brand-hero {
    padding: 28px 0 12px;
  }

  body:not(.is-tool-open) .hero-title {
    font-size: clamp(2rem, 7vw, 3rem);
  }

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

@media (max-width: 600px) {
  body:not(.is-tool-open) .brand-hero {
    padding: 22px 0 8px;
  }

  body:not(.is-tool-open) .brand-hero h1 {
    max-width: 360px;
    font-size: clamp(1.9rem, 8.8vw, 2.35rem) !important;
    line-height: 1.08;
  }

  body:not(.is-tool-open) .hero-title {
    font-size: 1.7rem;
  }

  body:not(.is-tool-open) .hero-lead {
    display: block;
    margin-top: 10px;
    font-size: 0.86rem;
  }

  body:not(.is-tool-open) .dashboard-search input {
    min-height: 48px;
  }

  body:not(.is-tool-open) .filter-pills {
    justify-content: flex-start;
    margin-bottom: 18px;
  }

  body:not(.is-tool-open) .tool-card-grid {
    grid-template-columns: 1fr;
  }

  body:not(.is-tool-open) .tool-card {
    min-height: 142px;
    padding: 18px;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero {
    padding: 20px 0 14px;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero h1 {
    font-size: 2rem;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero > p:last-child {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.9rem;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) {
    min-height: 420px;
    padding: 12px 0 54px;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-form {
    grid-template-columns: 1fr;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-field,
  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .advanced-settings,
  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .permission-grid,
  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .field,
  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-note,
  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .limitation,
  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .compress-size-summary {
    grid-column: 1;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-zone {
    min-height: 146px;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt strong {
    min-height: 86px;
    padding: 14px 18px;
    font-size: 1.28rem;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt small {
    font-size: 0.88rem;
  }
}

/* Compact, state-preserving tool workflow */
body:not(.is-tool-open) .brand-hero h1 {
  max-width: 980px;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero {
  padding: clamp(24px, 3.6vw, 42px) 0 16px;
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero h1 {
  font-size: clamp(2rem, 3.2vw, 3.25rem);
}

html[data-static-pages="true"] body.is-tool-open .seo-tool-hero > p:last-child {
  font-size: clamp(0.96rem, 1.1vw, 1.1rem);
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-form {
  width: min(820px, 100%);
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-zone {
  min-height: 132px;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt {
  width: min(100%, 440px);
  gap: 12px;
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt strong {
  min-height: 78px;
  padding: 14px 24px;
  font-size: clamp(1.2rem, 1.65vw, 1.55rem);
}

body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt small {
  font-size: 0.9rem;
}

body.is-tool-open .tool-panel:has(.file-drop-zone.has-files) {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) {
  display: block;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 12px 0 72px;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .tool-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-drop-field,
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .advanced-settings,
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .permission-grid,
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .field:has(textarea),
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .field:has(canvas),
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .tool-note,
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .limitation,
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .compress-size-summary,
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .tool-form > .button.primary:last-child {
  grid-column: 1 / -1;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-drop-field > span:first-child,
body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-picker-note {
  display: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-drop-zone.has-files {
  min-height: 92px;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-selected-state {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-selected-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  font-size: 0.78rem;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-selected-copy {
  gap: 2px;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-picker-actions {
  margin-top: -4px;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-selection-queue:not(:has(.file-queue-item:nth-child(2))) {
  display: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .tool-output {
  width: 100%;
  min-height: 0;
  margin-top: 18px;
  padding: 14px;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .tool-output:has([data-render-stage]):not(.is-processing):not(.is-success):not(.is-error) {
  display: none;
}

body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .preview-box {
  min-height: 160px;
}

@media (max-width: 600px) {
  body:not(.is-tool-open) .brand-hero h1 {
    max-width: 330px;
    font-size: clamp(1.65rem, 7.4vw, 2rem) !important;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero {
    padding: 16px 0 10px;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero h1 {
    font-size: 1.72rem;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) {
    min-height: 360px;
    padding-bottom: 42px;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-zone {
    min-height: 120px;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .file-drop-prompt strong {
    min-height: 68px;
    font-size: 1.12rem;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) {
    width: 100%;
    padding: 8px 0 52px;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .tool-form {
    grid-template-columns: 1fr;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .file-drop-field,
  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .advanced-settings,
  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .permission-grid,
  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .field,
  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .tool-note,
  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .limitation,
  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .compress-size-summary,
  body.is-tool-open .tool-body:has(.file-drop-zone.has-files) .tool-form > .button.primary:last-child {
    grid-column: 1;
  }
}

/* Tool icon system and searchable language selector */
.tool-icon .icon-tile.solo {
  position: absolute;
  inset: 0;
  width: 64px;
  height: 64px;
}

.tool-icon .icon-tile svg {
  width: 30px;
  height: 30px;
  color: #fff;
  stroke: currentColor;
}

.tools-mega-group .tool-icon .icon-tile.solo {
  position: static;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.tools-mega-group .tool-icon .icon-tile svg {
  width: 14px;
  height: 14px;
}

/* Browser-only Edit PDF workspace */
.tool-body.pdf-editor-body {
  display: block;
  padding: 0;
}

.tool-body.pdf-editor-body .tool-form {
  display: block;
}

.tool-body.pdf-editor-body .file-drop-field {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 22px;
}

.tool-body.pdf-editor-body .file-drop-zone.has-files {
  min-height: 86px;
}

.tool-body.pdf-editor-body .tool-form.is-pdf-editor-ready > .file-drop-field {
  display: none;
}

body.is-tool-open .tool-body.pdf-editor-body:has(.file-drop-zone.has-files) {
  width: 100%;
  padding: 0;
}

body.is-tool-open .tool-body.pdf-editor-body:has(.file-drop-zone.has-files) .tool-form {
  width: 100%;
  max-width: none;
  display: block;
}

body.is-tool-open .tool-body.pdf-editor-body:has(.file-drop-zone.has-files) .pdf-editor-workspace {
  display: block;
}

body:has(.tool-form.is-pdf-editor-ready) .donation-strip,
body:has(.tool-form.is-pdf-editor-ready) .seo-tool-intro,
body:has(.tool-form.is-pdf-editor-ready) .tool-panel > .tool-header {
  display: none;
}

html[data-static-pages="true"] body.is-tool-open:has(.tool-form.is-pdf-editor-ready) .workspace,
body:has(.tool-form.is-pdf-editor-ready) .workspace {
  width: 100%;
  padding: 0;
}

body:has(.tool-form.is-pdf-editor-ready) .tool-section {
  margin: 0;
}

body:has(.tool-form.is-pdf-editor-ready) .tool-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tool-body.pdf-editor-body .pdf-editor-output {
  display: none;
}

.pdf-editor-workspace {
  min-height: 680px;
  color: #1f2430;
  background: #f3f5f9;
  border-top: 1px solid #d7dce5;
}

.pdf-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 62px;
  padding: 10px 18px;
  border-bottom: 1px solid #d7dce5;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.pdf-editor-primary-modes {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 54px;
  overflow-x: auto;
  border-bottom: 1px solid #d7dce5;
}

.pdf-editor-primary-modes button {
  min-width: 104px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid #e5e7eb;
  color: #5f6470;
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}

.pdf-editor-primary-modes button.is-active {
  color: #2563eb;
  box-shadow: inset 0 -3px #2563eb;
}

.pdf-editor-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
}

.pdf-editor-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pdf-editor-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  background: #f8fafc;
}

.pdf-editor-tool-group[data-mode-group] {
  display: none;
}

.pdf-editor-workspace[data-editor-mode="select"] [data-mode-group="select"],
.pdf-editor-workspace[data-editor-mode="text"] [data-mode-group="text"],
.pdf-editor-workspace[data-editor-mode="insert"] [data-mode-group="insert"],
.pdf-editor-workspace[data-editor-mode="markup"] [data-mode-group="markup"],
.pdf-editor-workspace[data-editor-mode="shapes"] [data-mode-group="shapes"],
.pdf-editor-workspace[data-editor-mode="forms"] [data-mode-group="forms"],
.pdf-editor-workspace[data-editor-mode="ocr"] [data-mode-group="ocr"] {
  display: inline-flex;
}

.pdf-editor-history-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.pdf-editor-tool-group-label {
  padding: 0 7px;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pdf-editor-mode-switch button,
.pdf-editor-tool-button {
  min-height: 34px;
  border: 0;
  color: #53545e;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.pdf-editor-mode-switch button {
  min-width: 62px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: #fff;
}

.pdf-editor-mode-switch button.is-active {
  color: #fff;
  border-color: #ef3131;
  background: #ef3131;
}

.pdf-editor-tool-button {
  padding: 0 12px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  background: #fff;
}

.pdf-editor-mini-field {
  display: grid;
  gap: 3px;
  min-width: 180px;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 900;
}

.pdf-editor-mini-field input,
.pdf-editor-mini-field select {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  color: #111827;
  background: #fff;
}

.pdf-editor-mini-field.compact {
  min-width: 78px;
}

.pdf-editor-mini-field.color {
  min-width: 70px;
}

.pdf-editor-mini-field.color input {
  padding: 3px;
}

.pdf-editor-layout {
  display: grid;
  grid-template-columns: 220px minmax(420px, 1fr) 350px;
  min-height: calc(100vh - 178px);
}

.pdf-editor-thumbnails {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 14px;
  max-height: calc(100vh - 178px);
  padding: 16px 14px 24px;
  overflow: hidden;
  border-right: 1px solid #d7dce5;
  background: #f7f8fb;
}

.pdf-editor-sidebar-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #d7dce5;
  border-radius: 7px;
  overflow: hidden;
}

.pdf-editor-sidebar-tabs button {
  min-height: 36px;
  border: 0;
  color: #64748b;
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}

.pdf-editor-sidebar-tabs button.is-active {
  color: #fff;
  background: #2563eb;
}

.pdf-editor-thumb-zoom {
  position: relative;
  height: 4px;
  margin: 4px 16px;
  border-radius: 999px;
  background: #94a3b8;
}

.pdf-editor-thumb-zoom span {
  position: absolute;
  top: 50%;
  left: 30%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #475569;
  transform: translate(-50%, -50%);
}

.pdf-editor-thumbnails-list {
  display: grid;
  align-content: start;
  gap: 22px;
  min-height: 0;
  padding: 8px 4px 64px;
  overflow: auto;
}

.pdf-editor-thumbnails-list button {
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 0;
  color: #4b5563;
  background: transparent;
  cursor: pointer;
}

.pdf-editor-thumbnails-list canvas {
  width: 118px;
  max-height: 168px;
  border: 2px solid transparent;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.pdf-editor-thumbnails-list button.is-active canvas {
  border-color: #2684ff;
}

.pdf-editor-thumb-note {
  margin: 0;
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.35;
}

.pdf-editor-page-actions {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #d7dce5;
}

.pdf-editor-page-actions label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 900;
}

.pdf-editor-page-actions input {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #d7dce5;
  border-radius: 7px;
  color: #111827;
  background: #fff;
}

.pdf-editor-page-actions > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.pdf-editor-page-actions button {
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid #d7dce5;
  border-radius: 7px;
  color: #334155;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.pdf-editor-page-actions button:last-child {
  color: #dc2626;
}

.pdf-editor-canvas-panel {
  position: relative;
  display: grid;
  place-items: start center;
  max-height: calc(100vh - 178px);
  padding: 34px 28px 96px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    #eef1f6;
  background-size: 36px 36px;
}

.pdf-editor-canvas-shell {
  position: relative;
  width: max-content;
  min-width: 240px;
  min-height: 320px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.pdf-editor-canvas {
  display: block;
  background: #fff;
}

.pdf-editor-overlay {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  touch-action: none;
}

.pdf-edit-item {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
}

.pdf-edit-text {
  padding: 2px 4px;
  font-weight: 900;
  line-height: 1.15;
  transform: translateY(-8%);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pdf-edit-text.is-detected {
  min-height: 12px;
  color: transparent !important;
  border: 1px dashed rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.02);
}

.pdf-edit-text.is-detected:hover,
.pdf-edit-text.is-detected.is-selected {
  color: rgba(37, 99, 235, 0.86) !important;
  background: rgba(219, 234, 254, 0.78);
}

.pdf-edit-text.is-detected.is-dirty {
  color: inherit !important;
  border-color: #2563eb;
  background: #fff;
}

.pdf-edit-image {
  object-fit: contain;
  border: 1px dashed rgba(37, 99, 235, 0.38);
  background: rgba(255, 255, 255, 0.35);
}

.pdf-edit-highlight {
  opacity: 0.32;
}

.pdf-edit-mark-line,
.pdf-edit-squiggle {
  overflow: visible;
}

.pdf-edit-mark-line i {
  position: absolute;
  left: 0;
  width: 100%;
}

.pdf-edit-cover {
  border: 1px dashed rgba(15, 23, 42, 0.22);
}

.pdf-edit-box {
  border: 2px solid;
  background: transparent;
}

.pdf-edit-ellipse {
  border: 2px solid;
  border-radius: 999px;
  background: transparent;
}

.pdf-edit-line {
  fill: none;
  overflow: visible;
}

.pdf-edit-form-field {
  display: grid;
  align-content: center;
  padding: 3px 6px;
  border: 1px dashed #2684ff;
  border-radius: 3px;
  overflow: hidden;
}

.pdf-edit-dropdown {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.pdf-edit-dropdown i {
  font-style: normal;
  font-size: 0.72em;
}

.pdf-edit-form-button {
  display: grid;
  place-items: center;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  overflow: hidden;
  font-weight: 800;
}

.pdf-edit-checkbox {
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.pdf-edit-radio {
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: #fff;
}

.pdf-edit-radio i {
  width: 52%;
  height: 52%;
  border-radius: 999px;
  background: currentColor;
}

.pdf-edit-comment {
  display: block;
  padding: 8px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  overflow: hidden;
  white-space: pre-wrap;
}

.pdf-edit-stamp {
  display: grid;
  place-items: center;
  padding: 3px 8px;
  border: 3px solid;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

.pdf-edit-item.is-selected {
  outline: 3px solid #2684ff;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(38, 132, 255, 0.14);
}

.pdf-edit-drawing {
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  pointer-events: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pdf-editor-floating-controls {
  position: sticky;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: center;
  margin-top: 18px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(51, 52, 62, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.pdf-editor-floating-controls button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: #fff;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
}

.pdf-editor-floating-controls span {
  font-weight: 850;
}

.pdf-editor-side-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  max-height: calc(100vh - 178px);
  padding: 24px 18px;
  overflow-y: auto;
  border-left: 1px solid #d7dce5;
  background: #fff;
}

.pdf-editor-side-panel h3 {
  margin: 0;
  color: #202536;
  font-size: 2rem;
}

.pdf-editor-workspace [data-side-mode] {
  display: none;
}

.pdf-editor-workspace[data-editor-mode="text"] [data-side-mode="text"],
.pdf-editor-workspace[data-editor-mode="insert"] [data-side-mode="insert"],
.pdf-editor-workspace[data-editor-mode="ocr"] [data-side-mode="ocr"] {
  display: grid;
}

.pdf-editor-workspace[data-editor-mode="markup"] .pdf-editor-style-panel,
.pdf-editor-workspace[data-editor-mode="shapes"] .pdf-editor-style-panel,
.pdf-editor-workspace[data-editor-mode="forms"] .pdf-editor-style-panel {
  display: grid;
}

.pdf-editor-ocr-panel,
.pdf-editor-stamps,
.pdf-editor-layers {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  background: #f8fafc;
}

.pdf-editor-ocr-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.pdf-editor-ocr-panel > div:first-child span,
.pdf-editor-layers > div > span {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.pdf-editor-ocr-panel label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 900;
}

.pdf-editor-ocr-panel input,
.pdf-editor-ocr-panel select {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #d7dce5;
  border-radius: 7px;
  color: #111827;
  background: #fff;
}

.pdf-editor-ocr-actions,
.pdf-editor-stamps > div,
.pdf-editor-layers-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-editor-ocr-actions .button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 0.72rem;
}

.pdf-editor-ocr-panel progress {
  width: 100%;
  accent-color: #2563eb;
}

.pdf-editor-stamps button {
  min-height: 34px;
  padding: 0 9px;
  border: 2px solid currentColor;
  border-radius: 6px;
  color: #166534;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.pdf-editor-stamps button:nth-child(3) {
  color: #1d4ed8;
}

.pdf-editor-stamps button:nth-child(4) {
  color: #b45309;
}

.pdf-editor-layers-heading {
  align-items: center;
  justify-content: space-between;
}

.pdf-editor-layers-heading button {
  border: 0;
  color: #dc2626;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

[data-edit-layers] {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}

[data-edit-layers] button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #d7dce5;
  border-radius: 7px;
  color: #334155;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

[data-edit-layers] button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-edit-layers] button small {
  color: #64748b;
}

[data-edit-layers] button.is-active {
  color: #1d4ed8;
  border-color: #60a5fa;
  background: #eff6ff;
}

.pdf-editor-style-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d7dce5;
  border-radius: 12px;
  background: #f8fafc;
}

.pdf-editor-style-panel h4 {
  margin: 0;
  color: #202536;
  font-size: 1.05rem;
}

.pdf-editor-style-panel label {
  display: grid;
  gap: 6px;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 900;
}

.pdf-editor-style-panel textarea,
.pdf-editor-style-panel input,
.pdf-editor-style-panel select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  color: #111827;
  background: #fff;
}

.pdf-editor-style-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-editor-style-buttons[hidden],
.pdf-editor-selection-panel label[hidden] {
  display: none !important;
}

.pdf-editor-style-buttons button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  color: #6b7280;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.pdf-editor-style-buttons button.is-active {
  color: #fff;
  border-color: #2684ff;
  background: #2684ff;
}

.pdf-editor-style-buttons select {
  min-height: 38px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  color: #111827;
  background: #fff;
}

.pdf-editor-color-row {
  display: flex;
  gap: 9px;
}

.pdf-editor-color-row button {
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: 0 0 0 1px #d7dce5;
  cursor: pointer;
}

.pdf-editor-tip,
.pdf-editor-tool-card span {
  margin: 0;
  color: #4b5563;
  line-height: 1.45;
}

.pdf-editor-tip {
  padding: 16px;
  border-radius: 8px;
  background: #dff2ff;
}

.pdf-editor-tool-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  background: #f8fafc;
}

.pdf-editor-live-status {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  color: #465367;
  background: #f8fafc;
  line-height: 1.45;
}

.pdf-editor-live-status.success {
  color: #064e3b;
  border-color: rgba(16, 185, 129, 0.28);
  background: #ecfdf5;
}

.pdf-editor-live-status.error {
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.28);
  background: #fff1f2;
}

.pdf-editor-live-status a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  background: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

.pdf-editor-selection-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #c4d2ea;
  border-radius: 12px;
  background: #f8fbff;
}

.pdf-editor-selection-panel[hidden] {
  display: none;
}

.pdf-editor-rewrite-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #b7c8e4;
  border-radius: 8px;
  background: #eef6ff;
}

.pdf-editor-rewrite-panel[hidden] {
  display: none;
}

.pdf-editor-rewrite-panel textarea[readonly] {
  color: #475569;
  background: #ffffff;
  resize: vertical;
}

.pdf-editor-rewrite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-editor-rewrite-actions .button {
  min-height: 38px;
  padding: 8px 12px;
}

.pdf-editor-rewrite-panel small {
  color: #53657d;
  font-size: 0.76rem;
  line-height: 1.5;
}

.pdf-editor-selection-panel strong {
  color: #202536;
}

.pdf-editor-selection-panel label,
.pdf-editor-inspector-grid label {
  display: grid;
  gap: 6px;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 900;
}

.pdf-editor-selection-panel textarea,
.pdf-editor-inspector-grid input,
.pdf-editor-inspector-grid select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  color: #111827;
  background: #fff;
}

.pdf-editor-check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
}

.pdf-editor-check-row[hidden] {
  display: none !important;
}

.pdf-editor-check-row input {
  width: 18px;
  height: 18px;
}

.pdf-editor-inspector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pdf-editor-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pdf-editor-selection-actions .button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
}

.pdf-editor-selection-actions .danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.28);
}

.pdf-editor-save {
  position: sticky;
  bottom: 0;
  z-index: 2;
  min-height: 78px;
  margin-top: auto;
  border-radius: 12px;
  background: #ef3131;
  box-shadow: 0 16px 26px rgba(239, 49, 49, 0.24);
  font-size: 1.35rem;
}

@media (min-width: 1101px) {
  body:has(.tool-form.is-pdf-editor-ready) .pet-chat {
    right: 370px;
  }
}

html[data-theme="dark"] .pdf-editor-workspace,
:root[data-theme="dark"] .pdf-editor-workspace {
  color: #e8eefc;
  background: #111827;
}

html[data-theme="dark"] .pdf-editor-toolbar,
:root[data-theme="dark"] .pdf-editor-toolbar,
html[data-theme="dark"] .pdf-editor-side-panel,
:root[data-theme="dark"] .pdf-editor-side-panel {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.96);
}

html[data-theme="dark"] .pdf-editor-mode-switch button,
:root[data-theme="dark"] .pdf-editor-mode-switch button,
html[data-theme="dark"] .pdf-editor-tool-button,
:root[data-theme="dark"] .pdf-editor-tool-button {
  color: #dbeafe;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.84);
}

html[data-theme="dark"] .pdf-editor-primary-modes,
:root[data-theme="dark"] .pdf-editor-primary-modes,
html[data-theme="dark"] .pdf-editor-context-row,
:root[data-theme="dark"] .pdf-editor-context-row {
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .pdf-editor-primary-modes button,
:root[data-theme="dark"] .pdf-editor-primary-modes button,
html[data-theme="dark"] .pdf-editor-sidebar-tabs button,
:root[data-theme="dark"] .pdf-editor-sidebar-tabs button {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.25);
  background: #111827;
}

html[data-theme="dark"] .pdf-editor-primary-modes button.is-active,
:root[data-theme="dark"] .pdf-editor-primary-modes button.is-active {
  color: #93c5fd;
  box-shadow: inset 0 -3px #60a5fa;
}

html[data-theme="dark"] .pdf-editor-sidebar-tabs button.is-active,
:root[data-theme="dark"] .pdf-editor-sidebar-tabs button.is-active {
  color: #fff;
  background: #2563eb;
}

html[data-theme="dark"] .pdf-editor-tool-group,
:root[data-theme="dark"] .pdf-editor-tool-group,
html[data-theme="dark"] .pdf-editor-ocr-panel,
:root[data-theme="dark"] .pdf-editor-ocr-panel,
html[data-theme="dark"] .pdf-editor-stamps,
:root[data-theme="dark"] .pdf-editor-stamps,
html[data-theme="dark"] .pdf-editor-layers,
:root[data-theme="dark"] .pdf-editor-layers {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.9);
}

html[data-theme="dark"] .pdf-editor-tool-group-label,
:root[data-theme="dark"] .pdf-editor-tool-group-label,
html[data-theme="dark"] .pdf-editor-ocr-panel label,
:root[data-theme="dark"] .pdf-editor-ocr-panel label,
html[data-theme="dark"] .pdf-editor-ocr-panel > div:first-child span,
:root[data-theme="dark"] .pdf-editor-ocr-panel > div:first-child span {
  color: #a9b9d3;
}

html[data-theme="dark"] .pdf-editor-ocr-panel input,
:root[data-theme="dark"] .pdf-editor-ocr-panel input,
html[data-theme="dark"] .pdf-editor-ocr-panel select,
:root[data-theme="dark"] .pdf-editor-ocr-panel select,
html[data-theme="dark"] .pdf-editor-stamps button,
:root[data-theme="dark"] .pdf-editor-stamps button,
html[data-theme="dark"] [data-edit-layers] button,
:root[data-theme="dark"] [data-edit-layers] button,
html[data-theme="dark"] .pdf-editor-page-actions input,
:root[data-theme="dark"] .pdf-editor-page-actions input,
html[data-theme="dark"] .pdf-editor-page-actions button,
:root[data-theme="dark"] .pdf-editor-page-actions button {
  border-color: rgba(148, 163, 184, 0.3);
  color: #e5edff;
  background: rgba(15, 23, 42, 0.88);
}

html[data-theme="dark"] [data-edit-layers] button.is-active,
:root[data-theme="dark"] [data-edit-layers] button.is-active {
  color: #bfdbfe;
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.28);
}

html[data-theme="dark"] .pdf-editor-mode-switch button.is-active,
:root[data-theme="dark"] .pdf-editor-mode-switch button.is-active {
  color: #fff;
  border-color: #ef3131;
  background: #ef3131;
}

html[data-theme="dark"] .pdf-editor-thumbnails,
:root[data-theme="dark"] .pdf-editor-thumbnails {
  border-color: rgba(148, 163, 184, 0.25);
  background: #101827;
}

html[data-theme="dark"] .pdf-editor-canvas-panel,
:root[data-theme="dark"] .pdf-editor-canvas-panel {
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    #0f172a;
  background-size: 36px 36px;
}

html[data-theme="dark"] .pdf-editor-side-panel h3,
:root[data-theme="dark"] .pdf-editor-side-panel h3 {
  color: #f8fafc;
}

html[data-theme="dark"] .pdf-editor-tip,
:root[data-theme="dark"] .pdf-editor-tip,
html[data-theme="dark"] .pdf-editor-tool-card,
:root[data-theme="dark"] .pdf-editor-tool-card,
html[data-theme="dark"] .pdf-editor-style-panel,
:root[data-theme="dark"] .pdf-editor-style-panel,
html[data-theme="dark"] .pdf-editor-live-status,
:root[data-theme="dark"] .pdf-editor-live-status,
html[data-theme="dark"] .pdf-editor-selection-panel,
:root[data-theme="dark"] .pdf-editor-selection-panel {
  border-color: rgba(148, 163, 184, 0.24);
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.14);
}

html[data-theme="dark"] .pdf-editor-rewrite-panel,
:root[data-theme="dark"] .pdf-editor-rewrite-panel {
  border-color: rgba(129, 140, 248, 0.35);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .pdf-editor-rewrite-panel textarea[readonly],
:root[data-theme="dark"] .pdf-editor-rewrite-panel textarea[readonly] {
  color: #cbd5e1;
  background: #101a2e;
}

html[data-theme="dark"] .pdf-editor-rewrite-panel small,
:root[data-theme="dark"] .pdf-editor-rewrite-panel small {
  color: #b8c7de;
}

html[data-theme="dark"] .pdf-editor-live-status.success,
:root[data-theme="dark"] .pdf-editor-live-status.success {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(20, 83, 45, 0.42);
}

html[data-theme="dark"] .pdf-editor-live-status.error,
:root[data-theme="dark"] .pdf-editor-live-status.error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.4);
}

html[data-theme="dark"] .pdf-editor-selection-panel strong,
:root[data-theme="dark"] .pdf-editor-selection-panel strong,
html[data-theme="dark"] .pdf-editor-style-panel h4,
:root[data-theme="dark"] .pdf-editor-style-panel h4 {
  color: #f8fafc;
}

html[data-theme="dark"] .pdf-editor-selection-panel textarea,
:root[data-theme="dark"] .pdf-editor-selection-panel textarea,
html[data-theme="dark"] .pdf-editor-style-panel textarea,
:root[data-theme="dark"] .pdf-editor-style-panel textarea,
html[data-theme="dark"] .pdf-editor-style-panel input,
:root[data-theme="dark"] .pdf-editor-style-panel input,
html[data-theme="dark"] .pdf-editor-style-panel select,
:root[data-theme="dark"] .pdf-editor-style-panel select,
html[data-theme="dark"] .pdf-editor-style-buttons button,
:root[data-theme="dark"] .pdf-editor-style-buttons button,
html[data-theme="dark"] .pdf-editor-style-buttons select,
:root[data-theme="dark"] .pdf-editor-style-buttons select,
html[data-theme="dark"] .pdf-editor-inspector-grid input,
:root[data-theme="dark"] .pdf-editor-inspector-grid input,
html[data-theme="dark"] .pdf-editor-inspector-grid select,
:root[data-theme="dark"] .pdf-editor-inspector-grid select,
html[data-theme="dark"] .pdf-editor-mini-field input,
:root[data-theme="dark"] .pdf-editor-mini-field input,
html[data-theme="dark"] .pdf-editor-mini-field select,
:root[data-theme="dark"] .pdf-editor-mini-field select {
  color: #e5edff;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.88);
}

@media (max-width: 1100px) {
  .pdf-editor-layout {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .pdf-editor-side-panel {
    grid-column: 1 / -1;
    border-top: 1px solid #d7dce5;
    border-left: 0;
  }

  .pdf-editor-save {
    min-height: 58px;
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .pdf-editor-toolbar {
    position: static;
    flex-wrap: wrap;
  }

  .pdf-editor-layout {
    grid-template-columns: 1fr;
  }

  .pdf-editor-canvas-panel {
    order: 1;
  }

  .pdf-editor-thumbnails {
    order: 2;
    grid-template-rows: auto auto auto auto;
    max-height: none;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid #d7dce5;
  }

  .pdf-editor-side-panel {
    order: 3;
  }

  .pdf-editor-thumbnails-list {
    grid-auto-flow: column;
    grid-auto-columns: 92px;
    overflow-x: auto;
  }

  .pdf-editor-thumbnails canvas {
    width: 74px;
  }

  .pdf-editor-canvas-panel {
    padding: 18px 10px 72px;
  }

  .pdf-editor-side-panel {
    padding: 22px 16px;
  }
}

/* PDF/A preparation result */
.pdfa-result {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid #cdd8ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(22, 39, 73, 0.08);
}

.pdfa-result h3,
.pdfa-result p { margin: 0; }

.pdfa-result h3 {
  margin-top: 3px;
  color: #101c36;
  font-size: 1.22rem;
  line-height: 1.35;
}

.pdfa-result-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #3975d7, #28569d);
}

.pdfa-result-mark svg { width: 32px; height: 32px; }

.pdfa-result-mark span {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  color: #1e4f91;
  background: #fff;
  font-size: 0.62rem;
  font-weight: 800;
}

.pdfa-checklist,
.pdfa-validation-note,
.pdfa-result > .button {
  grid-column: 1 / -1;
}

.pdfa-checklist {
  display: grid;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.pdfa-checklist li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: #34445f;
  line-height: 1.5;
}

.pdfa-checklist svg { width: 18px; height: 18px; color: #11996e; margin-top: 2px; }

.pdfa-validation-note {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border-left: 4px solid #e2a525;
  border-radius: 6px;
  color: #53421e;
  background: #fff7df;
  line-height: 1.5;
}

html[data-theme="dark"] .pdfa-result {
  border-color: #34435f;
  background: #162239;
  box-shadow: none;
}

html[data-theme="dark"] .pdfa-result h3 { color: #f7f9ff; }
html[data-theme="dark"] .pdfa-checklist li { color: #c7d3e8; }
html[data-theme="dark"] .pdfa-validation-note { color: #f6df9d; background: #312b1e; }

@media (max-width: 620px) {
  .pdfa-result {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    padding: 17px;
  }

  .pdfa-result-mark { width: 56px; height: 56px; }
  .pdfa-result-mark svg { width: 25px; height: 25px; }
  .pdfa-result h3 { font-size: 1.02rem; }
}

/* Focused local PDF processing and filename-aware download */
body.is-local-pdf-workflow-open {
  overflow: hidden;
}

.local-pdf-workflow[hidden],
.local-pdf-workflow [hidden] {
  display: none !important;
}

.local-pdf-workflow {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 36px 24px;
  background: var(--bg);
  color: var(--ink);
  opacity: 0;
  transition: opacity 180ms ease;
}

.local-pdf-workflow.is-visible {
  opacity: 1;
}

.local-pdf-workflow-shell {
  position: relative;
  display: grid;
  width: min(760px, 100%);
  min-height: min(660px, calc(100vh - 72px));
  align-items: center;
  padding: 72px 54px 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.local-pdf-workflow-back {
  position: absolute;
  top: 22px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.local-pdf-workflow-back:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.local-pdf-workflow-back svg {
  width: 18px;
  height: 18px;
}

.local-pdf-processing,
.local-pdf-ready {
  display: grid;
  justify-items: center;
  width: 100%;
  text-align: center;
}

.local-pdf-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.local-pdf-brand-mark {
  display: grid;
  width: 46px;
  height: 52px;
  place-items: center;
  border: 2px solid var(--brand);
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
}

.local-pdf-brand-mark svg {
  width: 25px;
  height: 25px;
}

.local-pdf-brand strong {
  font-size: 1.55rem;
  font-weight: 900;
}

.local-pdf-brand strong span {
  color: var(--brand);
}

.local-pdf-kicker {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.local-pdf-processing h2,
.local-pdf-ready h2 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.local-progress-dots {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 42px 0 34px;
  animation: local-progress-spin 1.6s linear infinite;
}

.local-progress-dots::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 6px solid var(--line);
  border-radius: 50%;
}

.local-progress-dots span {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--brand);
  transform-origin: 7px 43px;
  animation: local-progress-pulse 1.15s ease-in-out infinite alternate;
}

.local-progress-dots span:nth-child(2) {
  background: var(--accent);
  transform: rotate(72deg);
  animation-delay: -0.2s;
}

.local-progress-dots span:nth-child(3) {
  background: var(--green);
  transform: rotate(144deg);
  animation-delay: -0.4s;
}

.local-progress-dots span:nth-child(4) {
  background: var(--yellow);
  transform: rotate(216deg);
  animation-delay: -0.6s;
}

.local-progress-dots span:nth-child(5) {
  background: var(--red);
  transform: rotate(288deg);
  animation-delay: -0.8s;
}

.local-pdf-processing-status {
  margin: 0;
  max-width: 620px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.local-pdf-workflow-note {
  margin: 12px 0 0;
  max-width: 600px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.local-pdf-success-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.local-pdf-success-icon svg {
  width: 35px;
  height: 35px;
  stroke-width: 3;
}

.local-pdf-ready-copy {
  margin: 13px 0 28px;
  color: var(--muted);
  font-size: 0.98rem;
}

.local-pdf-ready-files {
  display: grid;
  gap: 12px;
  width: min(620px, 100%);
  max-height: 290px;
  overflow: auto;
  margin-bottom: 22px;
  text-align: left;
}

.local-pdf-file-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.local-pdf-file-icon {
  position: relative;
  display: grid;
  width: 48px;
  height: 56px;
  overflow: hidden;
  place-items: center;
  border-radius: 6px;
  background: #f43f5e;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
}

.local-pdf-file-icon::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.62);
  clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.local-pdf-file-name-wrap,
.local-pdf-file-input-wrap {
  display: grid;
  min-width: 0;
}

.local-pdf-file-name-wrap {
  gap: 6px;
}

.local-pdf-file-label {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.local-pdf-file-input-wrap {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
}

.local-pdf-file-input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.local-pdf-file-input-wrap input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 700;
}

.local-pdf-file-input-wrap > span {
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.86rem;
  font-weight: 850;
}

.local-pdf-file-name-wrap small {
  color: var(--muted);
  font-size: 0.76rem;
}

.local-pdf-download {
  display: inline-flex;
  width: min(420px, 100%);
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: 1.05rem;
}

.local-pdf-download svg {
  width: 22px;
  height: 22px;
}

.local-pdf-download.is-downloaded {
  background: var(--green);
}

.local-pdf-ready-privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.local-pdf-ready-privacy svg {
  width: 17px;
  height: 17px;
  color: var(--green);
}

@keyframes local-progress-spin {
  to { transform: rotate(360deg); }
}

@keyframes local-progress-pulse {
  from { opacity: 0.45; scale: 0.72; }
  to { opacity: 1; scale: 1; }
}

@media (max-width: 620px) {
  .local-pdf-workflow {
    align-items: stretch;
    padding: 0;
  }

  .local-pdf-workflow-shell {
    min-height: 100dvh;
    padding: 78px 18px 30px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .local-pdf-workflow-back {
    top: 17px;
    left: 14px;
  }

  .local-pdf-brand {
    margin-bottom: 26px;
  }

  .local-pdf-processing h2,
  .local-pdf-ready h2 {
    font-size: 1.75rem;
  }

  .local-progress-dots {
    margin: 34px 0 28px;
  }

  .local-pdf-file-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    padding: 11px;
  }

  .local-pdf-file-icon {
    width: 42px;
    height: 50px;
  }

  .local-pdf-download {
    min-height: 56px;
  }

  .local-pdf-ready-privacy {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .local-progress-dots {
    animation-duration: 8s;
  }

  .local-progress-dots span {
    animation: none;
  }
}

.language-menu {
  position: relative;
  z-index: 72;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.language-trigger:hover,
.language-trigger:focus-visible,
.language-menu.is-open .language-trigger {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.language-trigger > svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.language-current {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.language-current-flag,
.language-flag {
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  line-height: 1;
}

.language-current-flag {
  width: 18px;
  height: 13px;
}

.language-neutral-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(37, 99, 235, 0.95));
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 18px rgba(37, 99, 235, 0.22);
}

.language-neutral-mark.language-current-flag {
  width: 24px;
  height: 18px;
}

.language-chevron {
  width: 14px !important;
  height: 14px !important;
  transition: transform 160ms ease;
}

.language-menu.is-open .language-chevron {
  transform: rotate(180deg);
}

.language-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: min(440px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.22);
}

.language-panel[hidden] {
  display: none !important;
}

.language-menu.is-open .language-panel {
  display: grid;
  gap: 12px;
}

.language-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.language-panel-heading > div {
  display: grid;
  gap: 2px;
}

.language-panel-heading strong {
  font-size: 0.98rem;
}

.language-panel-heading span {
  color: var(--muted);
  font-size: 0.76rem;
}

.language-panel-heading button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--bg);
  cursor: pointer;
}

.language-panel-heading button:hover,
.language-panel-heading button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.language-panel-heading button svg {
  width: 17px;
  height: 17px;
}

.language-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
}

.language-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.language-search svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.language-search input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
}

.language-search input::placeholder {
  color: var(--muted);
}

.language-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: min(390px, calc(100vh - 230px));
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.language-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible {
  border-color: var(--line-strong);
  background: var(--bg);
  outline: none;
}

.language-option.is-active {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--brand);
  background: var(--blue-soft);
}

.language-option small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.language-option svg {
  width: 15px;
  height: 15px;
}

.language-flag {
  width: 20px;
  height: 15px;
}

.language-empty {
  grid-column: 1 / -1;
  margin: 16px 0;
  color: var(--muted);
  text-align: center;
}

.language-privacy {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.language-privacy svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--green);
}

.translation-engine {
  position: fixed !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.goog-te-balloon-frame {
  display: none !important;
}

body {
  top: 0 !important;
}

@media (max-width: 1120px) {
  .language-trigger {
    min-width: 40px;
    width: 40px;
    padding: 0;
  }

  .language-trigger > svg:first-child,
  .language-current-label,
  .language-chevron {
    display: none;
  }

  .language-current-flag {
    width: 20px;
    height: 15px;
  }
}

@media (max-width: 600px) {
  .account-nav {
    gap: 6px;
  }

  .language-trigger {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .language-panel {
    position: fixed;
    top: 62px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 74px);
  }

  .language-list {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 264px);
  }

  .language-option {
    min-height: 40px;
  }
}

/* Keep route content layout authoritative after legacy SEO rules. */
.seo-related nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seo-related a {
  display: grid;
  min-height: 82px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 760px) {
  .seo-related nav {
    grid-template-columns: 1fr;
  }

  .seo-related a {
    min-height: 0;
  }
}

/* Full Edit PDF workspace */
.pdf-editor-workspace {
  --editor-line: #d8dee8;
  --editor-muted: #687386;
  --editor-blue: #1877d2;
  min-height: 720px;
}

.pdf-editor-toolbar {
  gap: 0;
  padding: 0;
}

.pdf-editor-primary-modes {
  min-height: 62px;
  padding-left: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pdf-editor-primary-modes button {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 84px;
  padding: 6px 12px;
  font-size: 0.72rem;
}

.pdf-editor-primary-modes button svg {
  width: 21px;
  height: 21px;
}

.pdf-editor-primary-modes button.pdf-editor-icon-mode {
  min-width: 72px;
}

.pdf-editor-primary-modes button.is-active {
  color: var(--editor-blue);
  background: #f6faff;
}

.pdf-editor-context-row {
  min-height: 50px;
  padding: 6px 14px;
  overflow-x: auto;
  border-top: 1px solid var(--editor-line);
  scrollbar-width: thin;
}

.pdf-editor-mode-switch {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.pdf-editor-tool-group {
  gap: 2px;
  padding: 2px;
  border: 0;
  background: transparent;
}

.pdf-editor-mode-switch button,
.pdf-editor-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.pdf-editor-mode-switch button:hover,
.pdf-editor-tool-button:hover {
  color: var(--editor-blue);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.pdf-editor-mode-switch button.is-active {
  color: #fff;
  border-color: var(--editor-blue);
  background: var(--editor-blue);
}

.pdf-editor-mode-switch button svg,
.pdf-editor-tool-button svg {
  width: 18px;
  height: 18px;
}

.pdf-editor-mode-switch button span,
.pdf-editor-tool-button span {
  white-space: nowrap;
}

.pdf-editor-history-actions {
  flex: 0 0 auto;
}

.pdf-editor-quick-selection {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--editor-line);
  border-radius: 7px;
  background: #f8fafc;
}

.pdf-editor-quick-selection[hidden] {
  display: none;
}

.pdf-editor-quick-selection select {
  width: 104px;
}

.pdf-editor-quick-selection input[type="number"] {
  width: 58px;
}

.pdf-editor-quick-selection select,
.pdf-editor-quick-selection input[type="number"] {
  height: 32px;
  padding: 0 7px;
  border: 1px solid var(--editor-line);
  border-radius: 5px;
  color: #172033;
  background: #fff;
}

.pdf-editor-quick-selection input[type="color"] {
  width: 32px;
  height: 32px;
  padding: 3px;
  border: 1px solid var(--editor-line);
  border-radius: 5px;
  background: #fff;
}

.pdf-editor-quick-selection button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #667085;
  background: transparent;
  cursor: pointer;
}

.pdf-editor-quick-selection button.is-active {
  color: #fff;
  background: var(--editor-blue);
}

.pdf-editor-quick-selection button:last-child {
  color: #dc2626;
}

.pdf-editor-quick-selection.is-visual select,
.pdf-editor-quick-selection.is-visual input[type="number"],
.pdf-editor-quick-selection.is-visual [data-quick-selected-bold],
.pdf-editor-quick-selection.is-visual [data-quick-selected-italic],
.pdf-editor-quick-selection.is-visual [data-quick-selected-underline] {
  display: none;
}

.pdf-editor-layout {
  grid-template-columns: 238px minmax(430px, 1fr) 350px;
  min-height: calc(100vh - 176px);
}

.pdf-editor-workspace.is-sidebar-hidden .pdf-editor-layout {
  grid-template-columns: minmax(430px, 1fr) 350px;
}

.pdf-editor-workspace.is-sidebar-hidden .pdf-editor-thumbnails {
  display: none;
}

.pdf-editor-workspace.is-inspector-hidden .pdf-editor-layout {
  grid-template-columns: 238px minmax(430px, 1fr);
}

.pdf-editor-workspace.is-inspector-hidden .pdf-editor-side-panel {
  display: none;
}

.pdf-editor-workspace.is-sidebar-hidden.is-inspector-hidden .pdf-editor-layout {
  grid-template-columns: minmax(0, 1fr);
}

.pdf-editor-thumbnails {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  max-height: calc(100vh - 176px);
  padding: 12px 10px 18px;
}

.pdf-editor-sidebar-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pdf-editor-sidebar-tabs button svg {
  width: 17px;
  height: 17px;
}

.pdf-editor-sidebar-pane {
  display: none;
  min-height: 0;
  overflow: hidden;
}

.pdf-editor-sidebar-pane.is-active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.pdf-editor-sidebar-pane[data-sidebar-pane="items"].is-active {
  display: block;
  overflow-y: auto;
}

.pdf-editor-sidebar-items {
  display: grid;
  gap: 7px;
  padding: 4px;
}

.pdf-editor-sidebar-items > span {
  padding: 18px 10px;
  color: var(--editor-muted);
  font-size: 0.8rem;
  text-align: center;
}

.pdf-editor-sidebar-items button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--editor-line);
  border-radius: 7px;
  color: #334155;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.pdf-editor-sidebar-items button.is-active {
  color: #1d4ed8;
  border-color: #60a5fa;
  background: #eff6ff;
}

.pdf-editor-sidebar-items button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-editor-thumbnails-list {
  gap: 18px;
  padding-bottom: 20px;
}

.pdf-editor-thumbnail-card {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.pdf-editor-thumbnail-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.pdf-editor-thumbnail-card:hover .pdf-editor-thumbnail-actions,
.pdf-editor-thumbnail-card:focus-within .pdf-editor-thumbnail-actions {
  opacity: 1;
}

.pdf-editor-thumbnail-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--editor-line);
  border-radius: 6px;
  color: #64748b;
  background: #fff;
}

.pdf-editor-thumbnail-actions button:last-child {
  color: #dc2626;
}

.pdf-editor-thumbnail-actions svg {
  width: 15px;
  height: 15px;
}

.pdf-editor-page-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.pdf-editor-page-actions button svg {
  width: 14px;
  height: 14px;
}

.pdf-editor-canvas-panel {
  max-height: calc(100vh - 176px);
  min-height: 610px;
  padding: 28px 28px 92px;
  overscroll-behavior: contain;
}

.pdf-editor-overlay[data-active-tool="hand"],
.pdf-editor-workspace[data-active-tool="hand"] .pdf-editor-overlay {
  cursor: grab;
}

.pdf-editor-overlay.is-panning {
  cursor: grabbing;
}

.pdf-edit-item {
  cursor: move;
  user-select: none;
}

.pdf-edit-item.is-inline-editing {
  z-index: 9;
  min-width: 80px;
  cursor: text;
  user-select: text;
  outline: 2px solid var(--editor-blue);
  background: #fff !important;
  color: #111827 !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 1.5em;
  overflow: visible;
}

.pdf-edit-resize-handle {
  position: absolute;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 4px;
  color: #fff;
  background: var(--editor-blue);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  cursor: nwse-resize;
  transform: translate(-50%, -50%);
  touch-action: none;
}

.pdf-edit-resize-handle svg {
  width: 13px;
  height: 13px;
  pointer-events: none;
}

.pdf-editor-floating-controls {
  z-index: 15;
}

.pdf-editor-side-panel {
  gap: 14px;
  max-height: calc(100vh - 176px);
  padding: 0 18px 20px;
}

.pdf-editor-side-panel.is-inspecting-selection > .pdf-editor-style-panel,
.pdf-editor-side-panel.is-inspecting-selection > .pdf-editor-tip,
.pdf-editor-side-panel.is-inspecting-selection > .pdf-editor-tool-card {
  display: none;
}

.pdf-editor-inspector-heading {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -18px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #d7dce5;
  background: inherit;
}

.pdf-editor-inspector-heading > div {
  display: grid;
  gap: 2px;
}

.pdf-editor-inspector-heading span {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 900;
}

.pdf-editor-inspector-heading h3 {
  font-size: 1.45rem;
}

.pdf-editor-inspector-heading button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d7dce5;
  border-radius: 7px;
  color: #64748b;
  background: #fff;
  cursor: pointer;
}

.pdf-editor-inspector-heading button svg {
  width: 18px;
  height: 18px;
}

.pdf-editor-style-panel,
.pdf-editor-selection-panel,
.pdf-editor-ocr-panel,
.pdf-editor-stamps,
.pdf-editor-layers {
  border-radius: 8px;
}

.pdf-editor-tip {
  font-size: 0.82rem;
}

.pdf-editor-save {
  min-height: 64px;
  border-radius: 8px;
  font-size: 1.15rem;
}

html[data-theme="dark"] .pdf-editor-quick-selection,
:root[data-theme="dark"] .pdf-editor-quick-selection {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.95);
}

html[data-theme="dark"] .pdf-editor-quick-selection select,
html[data-theme="dark"] .pdf-editor-quick-selection input[type="number"],
html[data-theme="dark"] .pdf-editor-quick-selection input[type="color"],
:root[data-theme="dark"] .pdf-editor-quick-selection select,
:root[data-theme="dark"] .pdf-editor-quick-selection input[type="number"],
:root[data-theme="dark"] .pdf-editor-quick-selection input[type="color"] {
  color: #e5edff;
  border-color: rgba(148, 163, 184, 0.3);
  background: #0f172a;
}

html[data-theme="dark"] .pdf-editor-sidebar-items button,
html[data-theme="dark"] .pdf-editor-thumbnail-actions button,
html[data-theme="dark"] .pdf-editor-inspector-heading button,
:root[data-theme="dark"] .pdf-editor-sidebar-items button,
:root[data-theme="dark"] .pdf-editor-thumbnail-actions button,
:root[data-theme="dark"] .pdf-editor-inspector-heading button {
  color: #dbeafe;
  border-color: rgba(148, 163, 184, 0.3);
  background: #111827;
}

html[data-theme="dark"] .pdf-editor-sidebar-items button.is-active,
:root[data-theme="dark"] .pdf-editor-sidebar-items button.is-active {
  color: #bfdbfe;
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.24);
}

html[data-theme="dark"] .pdf-editor-inspector-heading,
:root[data-theme="dark"] .pdf-editor-inspector-heading {
  border-color: rgba(148, 163, 184, 0.25);
}

@media (max-width: 1180px) {
  .pdf-editor-layout {
    grid-template-columns: 190px minmax(360px, 1fr) 310px;
  }

  .pdf-editor-primary-modes button {
    min-width: 76px;
  }

  .pdf-editor-mode-switch button span,
  .pdf-editor-tool-button span {
    display: none;
  }

  .pdf-editor-mode-switch button,
  .pdf-editor-tool-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }
}

@media (max-width: 900px) {
  .pdf-editor-workspace,
  .pdf-editor-layout,
  .pdf-editor-canvas-panel,
  .pdf-editor-side-panel,
  .pdf-editor-thumbnails {
    min-height: 0;
    max-height: none;
  }

  .pdf-editor-layout,
  .pdf-editor-workspace.is-sidebar-hidden .pdf-editor-layout,
  .pdf-editor-workspace.is-inspector-hidden .pdf-editor-layout,
  .pdf-editor-workspace.is-sidebar-hidden.is-inspector-hidden .pdf-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .pdf-editor-thumbnails {
    order: 2;
    display: block;
    overflow: visible;
    border-top: 1px solid var(--editor-line);
    border-right: 0;
  }

  .pdf-editor-workspace.is-sidebar-hidden .pdf-editor-thumbnails {
    display: none;
  }

  .pdf-editor-sidebar-pane.is-active {
    display: block;
  }

  .pdf-editor-thumbnails-list {
    display: flex;
    gap: 12px;
    padding: 10px 2px;
    overflow-x: auto;
  }

  .pdf-editor-thumbnail-card {
    flex: 0 0 126px;
  }

  .pdf-editor-thumbnail-actions {
    opacity: 1;
  }

  .pdf-editor-thumb-zoom {
    display: none;
  }

  .pdf-editor-canvas-panel {
    order: 1;
    min-height: 560px;
    max-height: 76vh;
    padding: 22px 16px 86px;
  }

  .pdf-editor-side-panel {
    order: 3;
    display: flex;
    border-top: 1px solid var(--editor-line);
    border-left: 0;
  }

  .pdf-editor-workspace.is-inspector-hidden .pdf-editor-side-panel {
    display: none;
  }
}

@media (max-width: 620px) {
  .pdf-editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .pdf-editor-primary-modes {
    min-height: 56px;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .pdf-editor-primary-modes::-webkit-scrollbar,
  .pdf-editor-mode-switch::-webkit-scrollbar {
    display: none;
  }

  .pdf-editor-primary-modes button {
    min-width: 66px;
    padding: 5px 8px;
    font-size: 0.64rem;
  }

  .pdf-editor-primary-modes button svg {
    width: 18px;
    height: 18px;
  }

  .pdf-editor-context-row {
    padding: 5px 8px;
    overflow-x: auto;
  }

  .pdf-editor-mode-switch {
    flex: 0 0 auto;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pdf-editor-mode-switch button,
  .pdf-editor-icon-mode,
  .pdf-editor-tool-button,
  .pdf-editor-floating-controls button,
  .pdf-editor-inspector-heading button {
    min-width: 44px;
    min-height: 44px;
  }

  .pdf-editor-quick-selection {
    order: 2;
  }

  .pdf-editor-quick-selection select {
    width: 86px;
  }

  .pdf-editor-history-actions {
    display: none;
  }

  .pdf-editor-canvas-panel {
    min-height: 480px;
    max-height: 68vh;
    padding-inline: 8px;
  }

  .pdf-editor-floating-controls {
    gap: 6px;
    padding: 7px 8px;
  }

  .pdf-editor-inspector-grid {
    grid-template-columns: 1fr;
  }

  .pdf-editor-side-panel {
    padding: 0 12px calc(20px + env(safe-area-inset-bottom));
  }

  .pdf-editor-selection-panel textarea,
  .pdf-editor-style-panel textarea,
  .pdf-editor-selection-panel input,
  .pdf-editor-selection-panel select,
  .pdf-editor-style-panel input,
  .pdf-editor-style-panel select {
    min-height: 44px;
    font-size: 16px;
  }

  .pdf-editor-check-row {
    align-items: flex-start;
    min-height: 44px;
  }

  .pdf-editor-rewrite-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Rich format-aware tool icons */
.clean-tool-icon .icon-tile.solo {
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 22px rgba(15, 23, 42, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover .clean-tool-icon .icon-tile.solo {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 15px 28px rgba(15, 23, 42, 0.22);
}

.clean-tool-icon.red .icon-tile.solo {
  background: linear-gradient(145deg, #fb7185, #e11d48);
}

.clean-tool-icon.blue .icon-tile.solo {
  background: linear-gradient(145deg, #60a5fa, #2563eb);
}

.clean-tool-icon.green .icon-tile.solo {
  background: linear-gradient(145deg, #34d399, #059669);
}

.clean-tool-icon.yellow .icon-tile.solo {
  background: linear-gradient(145deg, #fbbf24, #d97706);
}

.clean-tool-icon.purple .icon-tile.solo,
.clean-tool-icon.violet .icon-tile.solo {
  background: linear-gradient(145deg, #a78bfa, #7c3aed);
}

.clean-tool-icon.orange .icon-tile.solo {
  background: linear-gradient(145deg, #fb923c, #ea580c);
}

.tool-icon-format {
  position: absolute;
  right: -7px;
  bottom: -6px;
  display: inline-grid;
  place-items: center;
  min-width: 29px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 5px;
  background: #fff;
  color: #111827;
  box-shadow: 0 4px 9px rgba(15, 23, 42, 0.2);
  font-size: 0.48rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

:root[data-theme="dark"] .tool-icon-format {
  border-color: #172238;
  background: #f8fafc;
  color: #111827;
}

.tools-mega-group .tool-icon-format {
  right: -4px;
  bottom: -4px;
  min-width: 18px;
  height: 12px;
  padding: 0 2px;
  border-width: 1px;
  border-radius: 3px;
  font-size: 0.31rem;
}

/* Automatic-download confirmation */
.download-notice {
  position: fixed;
  right: 20px;
  bottom: 92px;
  z-index: 240;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  width: min(390px, calc(100vw - 40px));
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--ink);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.download-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.download-notice > svg {
  width: 22px;
  height: 22px;
  color: #10b981;
}

.download-file-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 50px;
  overflow: hidden;
  border-radius: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 950;
  letter-spacing: 0;
}

.download-file-icon::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.55);
  clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.download-file-zip {
  background: #7c3aed;
}

.download-file-doc,
.download-file-docx {
  background: #2563eb;
}

.download-file-jpg,
.download-file-jpeg,
.download-file-png,
.download-file-webp {
  background: #059669;
}

.download-file-txt,
.download-file-json,
.download-file-csv {
  background: #475569;
}

.download-notice-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.download-notice-copy strong {
  font-size: 0.9rem;
}

.download-notice-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .download-notice {
    right: 12px;
    bottom: 148px;
    width: calc(100vw - 24px);
  }
}

/* Typo-tolerant tool finder */
.dashboard-controls {
  display: grid;
  justify-content: stretch;
  gap: 10px;
  width: min(780px, 100%);
}

.dashboard-search {
  width: 100%;
}

.dashboard-search-box {
  position: relative;
  display: block;
}

.dashboard-search-box > svg {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.dashboard-search-box input {
  padding-right: 50px;
  padding-left: 48px;
}

.dashboard-search-box input::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}

.dashboard-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.dashboard-search-clear:hover,
.dashboard-search-clear:focus-visible {
  color: var(--ink);
  background: var(--brand-soft);
}

.dashboard-search-clear svg {
  width: 18px;
  height: 18px;
}

.dashboard-search-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-search-status {
  color: var(--brand);
  font-weight: 850;
}

.dashboard-search-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-search-examples button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
}

.dashboard-search-examples button:hover,
.dashboard-search-examples button:focus-visible {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--brand);
  background: var(--brand-soft);
}

#dashboard.is-searching .tool-card {
  animation: tool-search-reveal 180ms ease both;
}

@keyframes tool-search-reveal {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  body:not(.is-tool-open) .dashboard-controls {
    position: sticky;
    top: 60px;
    z-index: 28;
    width: calc(100% + 4px);
    margin: 10px -2px 0;
    padding: 8px 2px 10px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(12px);
  }

  body:not(.is-tool-open) .dashboard-search {
    gap: 5px;
  }

  body:not(.is-tool-open) .dashboard-search > span:first-child {
    font-size: 0.72rem;
  }

  body:not(.is-tool-open) .dashboard-search input {
    min-height: 50px;
    padding-right: 48px;
    padding-left: 44px;
    font-size: 16px;
  }

  .dashboard-search-box > svg {
    left: 14px;
  }

  .dashboard-search-meta {
    font-size: 0.7rem;
  }

  .dashboard-search-hint {
    display: none;
  }

  .dashboard-search-examples {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .dashboard-search-examples::-webkit-scrollbar {
    display: none;
  }

  .dashboard-search-examples button {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  body:not(.is-tool-open) .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 10px;
    padding: 0 0 5px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  body:not(.is-tool-open) .filter-pills::-webkit-scrollbar {
    display: none;
  }

  body:not(.is-tool-open) .filter-pill {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 15px;
    scroll-snap-align: start;
  }

  body:not(.is-tool-open) #dashboard.is-searching .tool-card {
    min-height: 116px;
    padding: 15px;
  }

  body:not(.is-tool-open) #dashboard.is-searching .tool-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  #dashboard.is-searching .tool-card {
    animation: none;
  }
}

/* NoLogPDF clean directory refresh */
.sr-only {
  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;
}

body {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body:not(.is-tool-open) .brand-hero {
  padding: clamp(14px, 2vw, 26px) 0 4px;
}

body:not(.is-tool-open) .brand-hero h1 {
  max-width: 900px;
  font-size: clamp(1.9rem, 2.7vw, 2.85rem);
  font-weight: 760;
  line-height: 1.1;
}

body:not(.is-tool-open) .hero-lead {
  max-width: 900px;
  margin-top: 7px;
  font-size: clamp(0.9rem, 1vw, 1.03rem);
  line-height: 1.4;
}

body:not(.is-tool-open) .dashboard-controls {
  grid-template-columns: minmax(0, 1fr);
  width: min(1080px, 100%);
  margin: 12px auto 0;
}

body:not(.is-tool-open) .dashboard-search {
  width: 100% !important;
  max-width: none !important;
  margin: 0;
}

body:not(.is-tool-open) .dashboard-search-box {
  width: 100%;
}

body:not(.is-tool-open) .dashboard-search-meta,
body:not(.is-tool-open) .dashboard-search-status,
body:not(.is-tool-open) .dashboard-search-hint {
  letter-spacing: 0;
  text-transform: none !important;
}

body:not(.is-tool-open) .dashboard-search-box input {
  min-height: 46px;
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

body:not(.is-tool-open) .dashboard-search-examples,
body:not(.is-tool-open) .filter-pills {
  justify-content: center;
}

body:not(.is-tool-open) .filter-pills {
  margin: 12px 0 22px;
}

body:not(.is-tool-open) .filter-pill {
  min-height: 40px;
  padding: 0 19px;
  border-color: #d7d9e2;
  color: #50515a;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 720;
  box-shadow: none;
}

body:not(.is-tool-open) .filter-pill.is-active {
  border-color: #30313a;
  background: #30313a;
  color: #fff;
}

body:not(.is-tool-open) .tool-card-grid {
  gap: 18px;
}

body:not(.is-tool-open) .tool-card {
  min-height: 270px;
  padding: 28px 30px;
  border-color: #d9dbe3;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body:not(.is-tool-open) .tool-card:hover,
body:not(.is-tool-open) .tool-card:focus-visible {
  border-color: #9da1ad;
  box-shadow: 0 12px 30px rgba(31, 35, 48, 0.09);
  transform: translateY(-2px);
}

body:not(.is-tool-open) .tool-card h3 {
  margin-top: 22px;
  color: #373840;
  font-size: 1.3rem;
  font-weight: 760;
  line-height: 1.2;
}

body:not(.is-tool-open) .tool-card p {
  margin-top: 10px;
  color: #747681;
  font-size: 0.91rem;
  line-height: 1.5;
}

html:not([data-theme="dark"]) body:not(.is-tool-open) {
  background: #f7f7fb;
}

html:not([data-theme="dark"]) body:not(.is-tool-open) .workspace {
  background:
    linear-gradient(145deg, rgba(238, 241, 250, 0.72), transparent 38%),
    linear-gradient(335deg, rgba(248, 232, 236, 0.54), transparent 30%);
}

html[data-theme="dark"] body:not(.is-tool-open) .filter-pill {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
}

html[data-theme="dark"] body:not(.is-tool-open) .filter-pill.is-active {
  border-color: #8b84ff;
  color: #fff;
  background: #6d63ec;
}

html[data-theme="dark"] body:not(.is-tool-open) .tool-card {
  border-color: #35415b;
  background: #172238;
}

html[data-theme="dark"] body:not(.is-tool-open) .tool-card h3 {
  color: #f8fafc;
}

html[data-theme="dark"] body:not(.is-tool-open) .tool-card p {
  color: #b4c1d6;
}

/* Flat stacked icons: format and direction remain readable at small sizes. */
.clean-tool-icon {
  position: relative;
  display: block;
  width: 66px;
  height: 62px;
  color: #fff;
  --tool-icon-color: #4f7fc0;
}

.clean-tool-icon .tool-icon-layer,
.clean-tool-icon .icon-tile.solo {
  position: absolute;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  transition: transform 160ms ease;
}

.clean-tool-icon .tool-icon-layer-back {
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  color: var(--tool-icon-color);
  background: color-mix(in srgb, var(--tool-icon-color) 25%, white);
  font-size: 0.67rem;
  font-weight: 900;
}

.clean-tool-icon .icon-tile.solo {
  right: 0;
  bottom: 0;
  width: 45px;
  height: 45px;
  color: #fff;
  background: var(--tool-icon-color);
}

.clean-tool-icon .icon-tile.solo > svg {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 21px;
  height: 21px;
  stroke-width: 2.25;
}

.tool-card:hover .clean-tool-icon .icon-tile.solo,
.tool-card:focus-visible .clean-tool-icon .icon-tile.solo {
  box-shadow: none;
  transform: translate(1px, -1px);
}

.clean-tool-icon.tool-icon-single .tool-icon-layer-back {
  display: none;
}

.clean-tool-icon.tool-icon-single .icon-tile.solo {
  right: auto;
  left: 0;
  width: 53px;
  height: 53px;
}

.clean-tool-icon.tool-icon-stacked .tool-icon-layer-back {
  width: 38px;
  height: 38px;
}

.clean-tool-icon.tool-icon-stacked .icon-tile.solo {
  width: 44px;
  height: 44px;
}

.clean-tool-icon.red { --tool-icon-color: #ef654a; }
.clean-tool-icon.blue { --tool-icon-color: #4f7fc0; }
.clean-tool-icon.green { --tool-icon-color: #59a75f; }
.clean-tool-icon.yellow { --tool-icon-color: #d4b520; }
.clean-tool-icon.purple,
.clean-tool-icon.violet { --tool-icon-color: #ae6095; }
.clean-tool-icon.orange { --tool-icon-color: #ee714f; }

.clean-tool-icon.red .icon-tile.solo,
.clean-tool-icon.blue .icon-tile.solo,
.clean-tool-icon.green .icon-tile.solo,
.clean-tool-icon.yellow .icon-tile.solo,
.clean-tool-icon.purple .icon-tile.solo,
.clean-tool-icon.violet .icon-tile.solo,
.clean-tool-icon.orange .icon-tile.solo {
  background: var(--tool-icon-color);
}

.clean-tool-icon .tool-icon-format {
  right: 5px;
  bottom: 4px;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  font-size: 0.56rem;
  font-weight: 900;
}

.clean-tool-icon.tool-icon-conversion .tool-icon-format {
  font-size: 0.95rem;
}

.clean-tool-icon.tool-icon-single .tool-icon-format {
  font-size: 0.5rem;
}

.clean-tool-icon.tool-icon-quad {
  width: 56px;
  height: 56px;
}

.clean-tool-icon .tool-icon-quad {
  display: grid;
  grid-template-columns: repeat(2, 24px);
  gap: 4px;
}

.clean-tool-icon .tool-icon-quad > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: #fff;
  background: var(--tool-icon-color);
}

.clean-tool-icon .tool-icon-quad svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}

.clean-tool-icon .tool-icon-quad + .tool-icon-format {
  display: none;
}

.tools-mega-group .clean-tool-icon {
  width: 31px;
  height: 29px;
  transform: scale(0.55);
  transform-origin: left center;
}

@media (min-width: 1280px) {
  body:not(.is-tool-open) .tool-card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body:not(.is-tool-open) .brand-hero {
    padding: 12px 0 3px;
  }

  body:not(.is-tool-open) .brand-hero h1 {
    max-width: 350px;
    font-size: clamp(1.45rem, 6.8vw, 1.8rem) !important;
    line-height: 1.12;
  }

  body:not(.is-tool-open) .hero-lead {
    max-width: 360px;
    margin-top: 6px;
    font-size: 0.8rem;
    line-height: 1.38;
  }

  body:not(.is-tool-open) .dashboard-controls {
    margin-top: 8px;
  }

  body:not(.is-tool-open) .dashboard-search-box input {
    min-height: 44px;
  }

  body:not(.is-tool-open) .filter-pills {
    justify-content: flex-start;
  }

  body:not(.is-tool-open) .tool-card {
    grid-template-columns: 62px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 14px;
    min-height: 116px;
    padding: 16px;
  }

  body:not(.is-tool-open) .tool-card .clean-tool-icon {
    grid-row: 1 / 3;
    align-self: center;
    transform: scale(0.86);
    transform-origin: left center;
  }

  body:not(.is-tool-open) .tool-card h3 {
    align-self: end;
    margin: 0;
    font-size: 1.08rem;
  }

  body:not(.is-tool-open) .tool-card p {
    display: -webkit-box;
    align-self: start;
    overflow: hidden;
    margin: 6px 0 0;
    font-size: 0.82rem;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.is-tool-open) .tool-card .new-badge {
    top: 8px;
    right: 8px;
  }
}

/* Professional semantic tool icons */
.professional-tool-icon {
  position: relative;
  display: block;
  width: 72px;
  height: 66px;
  flex: 0 0 auto;
  isolation: isolate;
  color: #fff;
  --tool-icon-color: #4b74c6;
  --tool-icon-deep: #31599f;
  --tool-icon-soft: #edf3ff;
}

.professional-tool-icon.red { --tool-icon-color: #f2644b; --tool-icon-deep: #c84434; --tool-icon-soft: #fff0ec; }
.professional-tool-icon.blue { --tool-icon-color: #4b78c2; --tool-icon-deep: #315a9c; --tool-icon-soft: #edf4ff; }
.professional-tool-icon.green { --tool-icon-color: #20a77b; --tool-icon-deep: #117658; --tool-icon-soft: #e9faf4; }
.professional-tool-icon.yellow { --tool-icon-color: #d9a817; --tool-icon-deep: #a87b04; --tool-icon-soft: #fff8dc; }
.professional-tool-icon.purple,
.professional-tool-icon.violet { --tool-icon-color: #a65d9b; --tool-icon-deep: #7b3c72; --tool-icon-soft: #faeef8; }
.professional-tool-icon.orange { --tool-icon-color: #ed7548; --tool-icon-deep: #bd4e2b; --tool-icon-soft: #fff0e8; }

.professional-tool-icon .tool-icon-aura {
  position: absolute;
  z-index: -1;
  inset: 10px 5px 2px 8px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--tool-icon-color) 22%, transparent);
  filter: blur(10px);
  opacity: 0.72;
  transition: opacity 180ms ease, transform 180ms ease;
}

.professional-tool-icon .tool-icon-layer,
.professional-tool-icon .icon-tile.solo {
  position: absolute;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tool-icon-color) 22%, #fff);
  box-shadow: 0 9px 20px color-mix(in srgb, var(--tool-icon-deep) 18%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.professional-tool-icon .icon-tile.solo {
  top: 3px;
  right: auto;
  bottom: auto;
  left: 0;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background-color: var(--tool-icon-color);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 42%), linear-gradient(325deg, var(--tool-icon-deep), var(--tool-icon-color) 62%);
}

.professional-tool-icon .icon-tile.solo::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 7px;
  width: 15px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  transform: rotate(-18deg);
}

.professional-tool-icon .icon-tile.solo > svg {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 29px;
  height: 29px;
  color: #fff;
  stroke-width: 2.15;
  filter: drop-shadow(0 2px 3px rgba(24, 35, 62, 0.18));
}

.professional-tool-icon .tool-icon-format {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 23px;
  height: auto;
  padding: 3px 4px 2px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 5px;
  color: var(--tool-icon-deep);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 8px rgba(30, 44, 74, 0.15);
  font-size: 0.47rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}

.professional-tool-icon.tool-icon-single .tool-icon-format,
.professional-tool-icon.tool-icon-quad .tool-icon-format { display: none; }

.professional-tool-icon.tool-icon-conversion .tool-icon-format,
.professional-tool-icon.tool-icon-stacked .tool-icon-format {
  right: 4px;
  bottom: 4px;
  min-width: 20px;
  padding: 2px 3px;
  font-size: 0.44rem;
}

.professional-tool-icon .tool-icon-layer-back {
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--tool-icon-deep);
  background-color: var(--tool-icon-soft);
  background-image: linear-gradient(145deg, #fff, var(--tool-icon-soft));
  font-size: 0.57rem;
  font-weight: 900;
  line-height: 1;
}

.professional-tool-icon.tool-icon-conversion,
.professional-tool-icon.tool-icon-stacked { width: 74px; height: 68px; }

.professional-tool-icon.tool-icon-conversion .icon-tile.solo,
.professional-tool-icon.tool-icon-stacked .icon-tile.solo {
  top: 17px;
  left: 23px;
  width: 49px;
  height: 49px;
  border-radius: 14px;
}

.professional-tool-icon.tool-icon-conversion .icon-tile.solo > svg,
.professional-tool-icon.tool-icon-stacked .icon-tile.solo > svg {
  top: 11px;
  left: 11px;
  width: 24px;
  height: 24px;
}

.professional-tool-icon .tool-icon-direction {
  position: absolute;
  z-index: 3;
  top: 19px;
  left: 22px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #18243b;
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.22);
}

.professional-tool-icon .tool-icon-direction svg { width: 11px; height: 11px; stroke-width: 2.8; }

.tool-card:hover .professional-tool-icon .icon-tile.solo,
.tool-card:focus-visible .professional-tool-icon .icon-tile.solo {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 14px 27px color-mix(in srgb, var(--tool-icon-deep) 24%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.tool-card:hover .professional-tool-icon .tool-icon-aura,
.tool-card:focus-visible .professional-tool-icon .tool-icon-aura { opacity: 1; transform: scale(1.06); }

.tools-mega-group .professional-tool-icon {
  width: 33px;
  height: 31px;
  transform: scale(0.48);
  transform-origin: left center;
}

html[data-theme="dark"] .professional-tool-icon .tool-icon-layer-back {
  border-color: color-mix(in srgb, var(--tool-icon-color) 45%, #253049);
  color: color-mix(in srgb, var(--tool-icon-color) 72%, #fff);
  background-color: #1c2940;
  background-image: linear-gradient(145deg, #26344e, #172238);
}

@media (max-width: 720px) {
  body:not(.is-tool-open) .tool-card .professional-tool-icon {
    width: 66px;
    height: 62px;
    transform: scale(0.82);
    transform-origin: left center;
  }
}

/* Non-overlapping icon composition */
.professional-tool-icon.tool-icon-conversion {
  width: 94px;
  height: 58px;
}

.professional-tool-icon.tool-icon-conversion .tool-icon-aura {
  inset: 9px 3px 5px 3px;
  border-radius: 15px;
}

.professional-tool-icon.tool-icon-conversion .tool-icon-layer-back {
  top: 11px;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tool-icon-deep) 12%, transparent);
}

.professional-tool-icon.tool-icon-conversion .icon-tile.solo {
  top: 5px;
  left: 52px;
  width: 42px;
  height: 48px;
  border-radius: 12px;
}

.professional-tool-icon.tool-icon-conversion .icon-tile.solo > svg {
  top: 9px;
  left: 10px;
  width: 21px;
  height: 21px;
}

.professional-tool-icon.tool-icon-conversion .tool-icon-direction {
  top: 20px;
  left: 37px;
  width: 12px;
  height: 16px;
  border: 0;
  border-radius: 0;
  color: var(--tool-icon-deep);
  background: transparent;
  box-shadow: none;
}

.professional-tool-icon.tool-icon-conversion .tool-icon-direction svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.professional-tool-icon.tool-icon-conversion .tool-icon-format {
  right: 4px;
  bottom: 4px;
  min-width: 19px;
  padding: 2px 3px;
  font-size: 0.4rem;
}

.professional-tool-icon.tool-icon-stacked {
  width: 80px;
  height: 62px;
}

.professional-tool-icon.tool-icon-stacked .icon-tile.solo {
  top: 3px;
  left: 0;
  width: 56px;
  height: 56px;
  border-radius: 15px;
}

.professional-tool-icon.tool-icon-stacked .icon-tile.solo > svg {
  top: 13px;
  left: 13px;
  width: 27px;
  height: 27px;
}

.professional-tool-icon.tool-icon-stacked .tool-icon-layer-back {
  z-index: 2;
  top: 8px;
  left: 61px;
  width: 19px;
  height: 25px;
  border-radius: 7px;
  border-color: color-mix(in srgb, var(--tool-icon-color) 30%, #fff);
  font-size: 0.48rem;
  box-shadow: 0 5px 11px color-mix(in srgb, var(--tool-icon-deep) 13%, transparent);
}

.professional-tool-icon.tool-icon-stacked .tool-icon-format {
  display: none;
}

html[data-theme="dark"] .professional-tool-icon.tool-icon-conversion .tool-icon-direction {
  color: color-mix(in srgb, var(--tool-icon-color) 72%, #fff);
}

@media (max-width: 720px) {
  body:not(.is-tool-open) .tool-card .professional-tool-icon.tool-icon-conversion {
    width: 78px;
    transform: scale(0.72);
  }

  body:not(.is-tool-open) .tool-card .professional-tool-icon.tool-icon-stacked {
    width: 68px;
    transform: scale(0.78);
  }
}

/* Android-first layout: compact navigation, directory, and tool workspace. */
@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  html {
    scroll-padding-top: 96px;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
    font-size: 16px;
  }

  .app-shell {
    width: 100%;
    overflow-x: clip;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 56px;
    padding: 0 10px;
  }

  .brand {
    min-width: 0;
    gap: 7px;
  }

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

  .brand-word {
    overflow: hidden;
    font-size: 1.03rem;
    white-space: nowrap;
  }

  .desktop-nav,
  .privacy-status {
    display: none !important;
  }

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

  .theme-toggle,
  .language-trigger,
  .app-grid-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 7px;
  }

  .theme-toggle {
    box-shadow: none;
  }

  .theme-icon {
    width: 21px;
    height: 21px;
  }

  .language-trigger {
    justify-content: center;
    gap: 0;
    padding: 0;
  }

  .language-trigger > svg:first-child,
  .language-current-label,
  .language-chevron {
    display: none;
  }

  .language-current {
    display: grid;
    place-items: center;
  }

  .language-current-flag,
  .language-neutral-mark.language-current-flag {
    width: 25px;
    min-width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 0.58rem;
  }

  .app-grid-button {
    grid-template-columns: repeat(3, 4px);
    place-content: center;
    gap: 4px;
    padding: 0;
  }

  .app-grid-button span {
    width: 4px;
    height: 4px;
  }

  .quick-menu {
    position: fixed;
    top: 60px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100svh - 72px);
    overflow-y: auto;
    padding: 8px;
    border-radius: 8px;
  }

  .quick-menu.is-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-menu a {
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 0.86rem;
  }

  .language-panel {
    position: fixed;
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: min(72svh, 560px);
    border-radius: 8px;
  }

  .language-list {
    grid-template-columns: 1fr;
    max-height: min(46svh, 360px);
  }

  .donation-strip {
    top: 56px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
    padding: 5px 10px;
  }

  .donation-strip-copy {
    justify-content: flex-start;
    width: auto;
    overflow: hidden;
    font-size: 0.7rem;
    text-align: left;
    white-space: nowrap;
  }

  .donation-strip-copy span:last-child {
    display: none;
  }

  .donation-pulse {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
  }

  .donation-button {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .workspace {
    width: 100%;
    padding: 0 10px 46px;
  }

  body:not(.is-tool-open) .brand-hero {
    padding: 20px 4px 6px;
  }

  body:not(.is-tool-open) .brand-hero h1 {
    max-width: 340px;
    font-size: 1.72rem !important;
    line-height: 1.12;
  }

  body:not(.is-tool-open) .hero-lead {
    max-width: 350px;
    margin-top: 7px;
    font-size: 0.86rem;
    line-height: 1.42;
  }

  body:not(.is-tool-open) .dashboard-controls {
    width: 100%;
    margin-top: 10px;
  }

  body:not(.is-tool-open) .dashboard-search,
  body:not(.is-tool-open) .dashboard-search-box {
    width: 100%;
    max-width: none;
  }

  body:not(.is-tool-open) .dashboard-search-box input {
    min-height: 44px;
    padding-right: 44px;
    font-size: 0.91rem;
  }

  body:not(.is-tool-open) .filter-pills {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 12px -10px 14px;
    padding: 0 10px 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: inline proximity;
  }

  body:not(.is-tool-open) .filter-pills::-webkit-scrollbar {
    display: none;
  }

  body:not(.is-tool-open) .filter-pill {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 0.79rem;
    scroll-snap-align: start;
  }

  body:not(.is-tool-open) .tool-card-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  body:not(.is-tool-open) .tool-card {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 5px 13px;
    min-height: 112px;
    padding: 14px;
    border-radius: 7px;
  }

  body:not(.is-tool-open) .tool-card .professional-tool-icon,
  body:not(.is-tool-open) .tool-card .clean-tool-icon,
  body:not(.is-tool-open) .tool-card .tool-icon {
    grid-row: 1 / 3;
    align-self: center;
    margin: 0;
    transform: scale(0.76);
    transform-origin: left center;
  }

  body:not(.is-tool-open) .tool-card h3 {
    align-self: end;
    margin: 0;
    padding-right: 28px;
    font-size: 1rem;
    line-height: 1.22;
  }

  body:not(.is-tool-open) .tool-card p {
    display: -webkit-box;
    align-self: start;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.is-tool-open) .tool-card .new-badge {
    top: 8px;
    right: 8px;
    min-height: 24px;
    padding: 0 7px;
    font-size: 0.65rem;
  }

  html[data-static-pages="true"] body.is-tool-open .workspace {
    width: 100%;
    padding: 0 0 42px;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-intro {
    margin: 0;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero {
    padding: 20px 14px 14px;
    text-align: center;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero .section-kicker {
    margin-bottom: 5px;
    font-size: 0.68rem;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero h1 {
    margin: 0 auto 7px;
    font-size: 1.72rem !important;
    line-height: 1.14;
  }

  html[data-static-pages="true"] body.is-tool-open .seo-tool-hero > p {
    display: -webkit-box;
    max-width: 360px;
    overflow: hidden;
    margin: 0 auto;
    font-size: 0.84rem !important;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.is-tool-open .tool-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.is-tool-open .tool-header {
    display: none;
  }

  body.is-tool-open .tool-body,
  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) {
    display: block;
    min-height: 0;
    padding: 10px;
  }

  body.is-tool-open .tool-body:has(.file-drop-zone:not(.has-files)) .tool-form {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 12px;
  }

  body.is-tool-open .tool-form,
  body.is-tool-open .tool-output {
    width: 100%;
  }

  body.is-tool-open .file-drop-zone {
    min-height: 144px;
    padding: 16px 12px;
  }

  body.is-tool-open .drop-icon {
    width: 52px;
    height: 52px;
  }

  body.is-tool-open .file-drop-zone strong {
    font-size: 1rem;
  }

  body.is-tool-open .file-drop-zone small {
    font-size: 0.78rem;
  }

  body.is-tool-open .field input,
  body.is-tool-open .field select,
  body.is-tool-open .button,
  body.is-tool-open .file-add-button,
  body.is-tool-open .file-clear-button {
    min-height: 44px;
  }

  body.is-tool-open .tool-form > .button.primary:last-child {
    width: 100%;
  }

  body.is-tool-open .tool-output {
    min-height: 170px;
    margin-top: 12px;
  }

  body.is-tool-open .render-stage {
    min-height: 180px;
  }

  .pdf-editor-toolbar,
  .pdf-editor-primary-modes,
  .pdf-editor-context-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .pdf-editor-toolbar::-webkit-scrollbar,
  .pdf-editor-primary-modes::-webkit-scrollbar,
  .pdf-editor-context-row::-webkit-scrollbar {
    display: none;
  }

  .pdf-editor-primary-modes button,
  .pdf-editor-tool-button {
    flex: 0 0 auto;
    min-width: 66px;
    min-height: 48px;
  }

  .pdf-editor-canvas-panel {
    min-height: 58svh;
  }

  .pdf-editor-side-panel {
    padding: 16px 10px;
  }

  .local-pdf-workflow {
    padding: 0;
  }

  .local-pdf-workflow-shell {
    width: 100%;
    min-height: 100svh;
    padding: 70px 16px 28px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .local-pdf-workflow-back {
    top: 14px;
    left: 12px;
  }

  .pet-chat {
    right: 10px;
    bottom: 10px;
  }

  .pet-chat-button {
    min-height: 48px;
  }

  .pet-chat-panel {
    right: 0;
    bottom: 58px;
    width: min(360px, calc(100vw - 20px));
    max-height: min(72svh, 600px);
  }
}

@media (min-width: 520px) and (max-width: 720px) {
  body:not(.is-tool-open) .tool-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Some Android browsers report a wider CSS viewport. Keep touch-first layouts
   comfortably framed instead of falling back to the desktop directory. */
@media (min-width: 721px) and (hover: none) and (pointer: coarse) {
  .workspace,
  html[data-static-pages="true"] body.is-tool-open .workspace {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
  }

  body:not(.is-tool-open) .brand-hero h1,
  body:not(.is-tool-open) .hero-lead {
    max-width: 620px;
  }

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

  html[data-static-pages="true"] body.is-tool-open .seo-tool-intro,
  body.is-tool-open .tool-panel {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
  }
}
