:root {
  color-scheme: light;
  --bg: #eef6f4;
  --surface: #ffffff;
  --surface-soft: #f5faf8;
  --line: #d7e7e2;
  --line-strong: #9fbcb4;
  --text: #111827;
  --muted: #526579;
  --faint: #8392a3;
  --blue: #2f5df5;
  --blue-dark: #1837b7;
  --blue-soft: #e9eeff;
  --teal: #0d9f87;
  --teal-soft: #dcf8ef;
  --coral: #ff6b4a;
  --coral-soft: #fff0eb;
  --green: #138a5d;
  --green-bg: #e8f7f0;
  --amber: #b76b00;
  --amber-bg: #fff5df;
  --danger: #c93d3d;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(49, 92, 246, 0.22);
  outline-offset: 2px;
}

.next-editor-host {
  width: 100%;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.next-editor-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.landing-editor-host {
  background: #fff;
}

.seo-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: #172033;
  background:
    linear-gradient(135deg, rgba(255, 107, 74, 0.1) 0 12%, transparent 12% 100%),
    radial-gradient(circle at 82% 18%, rgba(13, 159, 135, 0.16), transparent 28rem),
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(17, 24, 39, 0.025) 30px 31px),
    linear-gradient(180deg, #f5fbf9 0%, #ffffff 50%, #f2f7fb 100%);
}

.seo-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 22px;
  width: calc(100% - 48px);
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
}

.seo-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 21px;
  font-weight: 860;
  text-decoration: none;
}

.seo-brand strong,
.brand strong {
  color: var(--teal);
  font-weight: 900;
}

.seo-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 38%),
    #111827;
  border-radius: 8px;
  box-shadow:
    0 14px 34px rgba(17, 24, 39, 0.18),
    7px 7px 0 rgba(13, 159, 135, 0.18);
}

.seo-brand-mark svg {
  width: 22px;
  height: 22px;
}

.seo-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 0;
  color: #536276;
  font-size: 14px;
  font-weight: 760;
}

.seo-nav a {
  position: relative;
}

.seo-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 3px;
  background: var(--coral);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(3px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.seo-nav a,
.seo-steps a {
  color: inherit;
  text-decoration: none;
}

.seo-nav a:hover {
  color: #111827;
}

.seo-nav a:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.seo-login {
  justify-self: end;
  min-height: 42px;
  padding: 0 20px;
  color: #111827;
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  font-size: 14px;
  font-weight: 820;
}

.seo-account {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  max-width: 270px;
  min-height: 44px;
  gap: 11px;
  padding: 6px 8px 6px 14px;
  color: #111827;
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

.seo-account span {
  display: grid;
  min-width: 0;
  gap: 1px;
  color: #758298;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.seo-account strong {
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.seo-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(390px, 1fr);
  align-items: center;
  gap: clamp(34px, 6vw, 92px);
  width: calc(100% - 48px);
  max-width: 1180px;
  min-height: min(720px, calc(100vh - 72px));
  margin: 0 auto;
  padding: clamp(42px, 7vh, 82px) 0 76px;
}

.seo-copy h1 {
  max-width: 650px;
  margin: 0;
  color: #0d1321;
  font-size: clamp(42px, 6.5vw, 74px);
  line-height: 0.98;
  font-weight: 890;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.seo-copy p {
  max-width: 620px;
  margin: 24px 0 0;
  color: #536276;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.48;
}

.seo-bite-meter {
  display: inline-grid;
  grid-template-columns: auto 52px auto auto;
  align-items: center;
  gap: 11px;
  margin-top: 24px;
  padding: 10px;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid #d6e8e2;
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(17, 24, 39, 0.07);
}

.seo-bite-meter span {
  display: grid;
  gap: 1px;
  min-width: 104px;
  padding: 9px 11px;
  color: #667589;
  background: #f5faf8;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.seo-bite-meter strong {
  color: #111827;
  font-size: 19px;
  letter-spacing: 0;
  text-transform: none;
}

.seo-bite-meter i {
  position: relative;
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--coral), var(--teal));
  border-radius: 999px;
}

.seo-bite-meter i::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -2px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
  transform: translateY(-50%) rotate(45deg);
}

.seo-bite-meter b {
  padding: 11px 13px;
  color: #075e50;
  background: var(--teal-soft);
  border-radius: 7px;
  font-size: 13px;
  white-space: nowrap;
}

.seo-proof-list {
  display: grid;
  gap: 15px;
  max-width: 650px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.seo-proof-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 13px;
  min-width: 0;
  color: #243044;
  font-size: 17px;
  line-height: 1.38;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.seo-proof-list li::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-top: 1px;
  background:
    linear-gradient(135deg, transparent 51%, #ffffff 51% 66%, transparent 66%),
    linear-gradient(135deg, var(--teal), #23c7aa);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 95, 0.18);
}

.seo-dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  width: 100%;
  min-width: 0;
  min-height: 430px;
  padding: clamp(34px, 5vw, 58px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.99)),
    linear-gradient(135deg, rgba(255, 107, 74, 0.11) 0 16%, transparent 16% 100%),
    repeating-linear-gradient(90deg, rgba(13, 159, 135, 0.08) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(0deg, rgba(47, 93, 245, 0.07) 0 1px, transparent 1px 38px);
  border: 1px solid #cfe3dd;
  border-radius: 8px;
  box-shadow:
    0 28px 80px rgba(17, 24, 39, 0.12),
    12px 12px 0 rgba(13, 159, 135, 0.1);
  text-align: center;
}

.seo-dropzone::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 58px;
  height: 58px;
  background:
    radial-gradient(circle, var(--coral) 0 3px, transparent 4px) 0 0 / 18px 18px,
    radial-gradient(circle, var(--teal) 0 3px, transparent 4px) 9px 9px / 18px 18px;
  opacity: 0.38;
  pointer-events: none;
}

.seo-dropzone::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 2px dashed #8fd7c9;
  border-radius: 8px;
  pointer-events: none;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.seo-dropzone.dragging::before {
  background: rgba(37, 169, 134, 0.08);
  border-color: #25a986;
}

.seo-drop-label {
  position: relative;
  z-index: 1;
  justify-self: end;
  margin: -20px 2px 2px 0;
  padding: 6px 9px;
  color: #075e50;
  background: rgba(220, 248, 239, 0.92);
  border: 1px solid #ace2d7;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.seo-doc-stack {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-top: 14px;
  color: #315cf6;
}

.seo-doc-stack span,
.seo-doc-stack svg {
  position: absolute;
  display: block;
  width: 76px;
  height: 94px;
  background: #fff;
  border: 1px solid #cfe3dd;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.1);
}

.seo-doc-stack span:nth-child(1) {
  transform: translateX(-16px) rotate(-8deg);
  background: var(--teal-soft);
}

.seo-doc-stack span:nth-child(2) {
  transform: translateX(16px) rotate(8deg);
  background: var(--coral-soft);
}

.seo-doc-stack svg {
  position: relative;
  width: 82px;
  height: 102px;
  padding: 21px 18px;
  background: #fff;
}

.seo-dropzone h2 {
  position: relative;
  margin: 24px 0 0;
  color: #111827;
  font-size: clamp(27px, 3.4vw, 38px);
  line-height: 1.05;
  font-weight: 880;
}

.seo-dropzone p {
  position: relative;
  max-width: 430px;
  min-height: 24px;
  margin: 13px 0 0;
  overflow: hidden;
  color: #607084;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-upload-button {
  position: relative;
  width: min(360px, 100%);
  min-height: 58px;
  margin-top: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%),
    #2f5df5;
  border-radius: 8px;
  box-shadow:
    0 16px 34px rgba(47, 93, 245, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  font-size: 18px;
  font-weight: 850;
}

.seo-upload-button:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 42%),
    #1837b7;
}

.seo-dropzone small {
  position: relative;
  display: block;
  margin-top: 15px;
  color: #748399;
  font-size: 13px;
  font-weight: 720;
}

.seo-steps {
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 0 96px;
  border-top: 1px solid #e4ebf4;
}

.seo-steps h2 {
  margin: 0 0 28px;
  color: #111827;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.05;
  text-align: center;
}

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

.seo-step-grid article {
  padding: 24px;
  background: #fff;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.06);
}

.seo-step-grid span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0d705f;
  background: #e5f7f3;
  border-radius: 8px;
  font-weight: 900;
}

.seo-step-grid h3 {
  margin: 18px 0 8px;
  color: #111827;
  font-size: 20px;
}

.seo-step-grid p {
  margin: 0;
  color: #607084;
  font-size: 15px;
  line-height: 1.52;
}

.seo-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: -38px auto 58px;
  padding: 18px 0 0;
  color: #607084;
  border-top: 1px solid #e4ebf4;
  font-size: 14px;
  line-height: 1.45;
}

.seo-trust p {
  max-width: 720px;
  margin: 0;
}

.seo-trust div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  font-weight: 820;
}

.seo-trust a {
  color: #1837b7;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(228px, 280px) minmax(440px, 1fr) minmax(260px, 320px);
  grid-template-rows: 56px minmax(0, 1fr);
  height: 100vh;
  min-height: 680px;
}

.topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background:
    linear-gradient(90deg, rgba(220, 248, 239, 0.42), transparent 34%),
    rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

.brand,
.toolbar,
.top-actions,
.zoom-tools {
  display: flex;
  align-items: center;
}

.brand {
  gap: 9px;
  min-width: 0;
  font-size: 17px;
  font-weight: 820;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 38%),
    #111827;
  border: 1px solid #111827;
  border-radius: var(--radius);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    5px 5px 0 rgba(13, 159, 135, 0.18);
}

svg {
  width: 18px;
  height: 18px;
}

svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg .bite-mark-cut {
  stroke: var(--coral);
  stroke-width: 2.35;
}

.toolbar {
  gap: 6px;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  justify-self: center;
  padding: 4px;
  overflow: hidden;
  background: #f5faf8;
  border: 1px solid #dcece7;
  border-radius: var(--radius);
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: var(--line);
}

.top-actions {
  position: relative;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

#accountButton {
  max-width: 150px;
}

.support-action {
  color: #315c52;
}

.recompress-action {
  color: var(--blue-dark);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 76px;
  z-index: 25;
  display: grid;
  gap: 4px;
  width: min(260px, calc(100vw - 28px));
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.18);
}

.account-menu strong {
  display: block;
  padding: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu button {
  min-height: 34px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  text-align: left;
  font-size: 12px;
  font-weight: 760;
}

.account-menu button:hover {
  color: var(--text);
  background: var(--surface-soft);
}

#accountLabel {
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-button,
.icon-button,
.primary-drop-button {
  min-height: 34px;
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, color 150ms ease;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tool-button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.primary-drop-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.tool-button.primary,
.primary-drop-button {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 40%),
    var(--blue);
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(49, 92, 246, 0.2);
}

.tool-button.primary:hover:not(:disabled),
.primary-drop-button:hover:not(:disabled) {
  background: var(--blue-dark);
}

.tool-button.is-working {
  color: #fff;
  background: #111827;
  border-color: #111827;
}

.tool-button.success {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%),
    var(--teal);
  border-color: var(--teal);
  box-shadow: 0 8px 18px rgba(15, 159, 136, 0.18);
}

.tool-button.ghost {
  background: #fff;
}

.tool-button.editor-tool.active {
  color: #fff;
  background: #111827;
  border-color: #111827;
  box-shadow:
    0 8px 18px rgba(17, 24, 39, 0.14),
    4px 4px 0 rgba(255, 107, 74, 0.18);
}

.toolbar .editor-tool span,
#selectAllButton span,
#invertButton span {
  display: none;
}

.toolbar .editor-tool,
#selectAllButton,
#invertButton {
  width: 34px;
  padding: 0;
}

.left-rail,
.inspector {
  min-height: 0;
  background: var(--surface);
}

.left-rail {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.rail-heading,
.inspector-heading,
.range-row,
.job-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-size: 17px;
  line-height: 1.18;
}

.count-badge {
  min-width: 34px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-bg);
  text-align: center;
  font-size: 13px;
  font-weight: 780;
}

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: #fbfcfe;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.file-drop.compact {
  min-height: 42px;
  font-size: 13px;
  font-weight: 700;
}

.file-drop.dragging,
.drop-panel.dragging {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue);
}

.file-list {
  display: grid;
  gap: 8px;
}

.empty-file-state {
  padding: 10px;
  color: var(--muted);
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
}

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

.queue-summary div {
  display: grid;
  gap: 2px;
  padding: 9px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.queue-summary span,
.sidebar-insight span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.queue-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-insight,
.sidebar-tools {
  display: grid;
  gap: 10px;
  padding: 11px;
  background: #f7fbfa;
  border: 1px solid rgba(15, 159, 136, 0.2);
  border-radius: var(--radius);
}

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

.sidebar-insight strong,
.sidebar-tools-head strong {
  display: block;
  font-size: 13px;
}

.sidebar-insight button {
  min-height: 32px;
  padding: 0 10px;
  color: #fff;
  background: var(--teal);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

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

.sidebar-tool-grid button {
  min-height: 32px;
  padding: 0 8px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-tool-grid button:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 14px rgba(49, 92, 246, 0.08);
}

.job-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.memory-panel {
  display: grid;
  gap: 9px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.memory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.memory-head strong {
  display: block;
  font-size: 13px;
}

.memory-head button {
  min-height: 26px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 760;
}

.memory-list {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.memory-item {
  display: grid;
  gap: 4px;
  padding: 8px;
  background: #fbfcfe;
  border: 1px solid #e7edf5;
  border-radius: 6px;
}

.memory-item strong,
.memory-item span,
.memory-item b,
.memory-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-item strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.memory-item span,
.memory-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.memory-item b {
  display: block;
  color: var(--teal);
  font-size: 12px;
}

.legal-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal-panel a,
.legal-panel button {
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.legal-panel button {
  color: var(--blue);
}

.job-panel-head strong {
  display: block;
  font-size: 13px;
}

.lane-badge {
  padding: 5px 8px;
  color: var(--blue-dark);
  background: #eef4ff;
  border: 1px solid #cbdcff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.job-list {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.job-row {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.job-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-row span {
  color: var(--muted);
}

.job-meter {
  height: 5px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 999px;
}

.job-meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.file-chip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.file-chip strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip span {
  color: var(--muted);
  font-size: 12px;
}

.page-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0 2px 18px 0;
  overflow: auto;
  list-style: none;
}

.page-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.page-row.active {
  background: #eef4ff;
  border-color: #cbdcff;
}

.page-row.skipped {
  opacity: 0.56;
}

.thumb-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  color: var(--faint);
  background: #f9fbfd;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  width: 18px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.page-meta {
  min-width: 0;
}

.page-meta strong,
.page-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-meta strong {
  font-size: 13px;
}

.page-meta span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.mini-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
}

.mini-action:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.page-actions {
  display: grid;
  grid-template-columns: repeat(2, 30px);
  gap: 4px;
}

.include-box {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.include-box input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(90deg, rgba(28, 38, 53, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(28, 38, 53, 0.04) 1px, transparent 1px),
    #f3f6fa;
  background-size: 30px 30px;
}

.drop-screen,
.editor {
  width: 100%;
  height: 100%;
}

.drop-screen {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: 24px;
}

.entry-hero {
  display: grid;
  justify-items: center;
  width: min(740px, 100%);
  text-align: center;
}

.entry-hero h2 {
  margin: 6px 0 0;
  font-size: 56px;
  line-height: 0.96;
  letter-spacing: 0;
}

.entry-hero > p:not(.eyebrow) {
  max-width: 590px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.entry-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.entry-proof span {
  padding: 6px 9px;
  color: #315c52;
  background: rgba(229, 247, 243, 0.82);
  border: 1px solid rgba(15, 159, 136, 0.2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.drop-panel {
  display: grid;
  justify-items: center;
  width: min(430px, 100%);
  padding: 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(184, 197, 214, 0.82);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  outline: 1px dashed rgba(96, 112, 132, 0.34);
  outline-offset: -8px;
}

.drop-panel svg {
  width: 34px;
  height: 34px;
  padding: 9px;
  color: var(--blue);
  margin-bottom: 14px;
  background: var(--blue-soft);
  border: 1px solid #cdd9ff;
  border-radius: var(--radius);
  box-sizing: content-box;
}

.drop-panel h2 {
  max-width: 360px;
  font-size: 22px;
  line-height: 1.15;
}

.drop-panel p {
  max-width: 320px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.drop-capabilities {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 13px;
}

.drop-capabilities span {
  min-height: 24px;
  padding: 4px 8px;
  color: #0f513f;
  background: var(--teal-soft);
  border: 1px solid rgba(15, 159, 136, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.primary-drop-button {
  margin-top: 16px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 760;
}

.editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding: 18px;
  gap: 14px;
}

.preview-toolbar,
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-dock {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 159, 136, 0.26);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.result-dock h3 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.1;
}

.result-dock p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
}

.result-stats span {
  display: grid;
  gap: 2px;
  padding: 9px;
  background: #f7fbfa;
  border: 1px solid rgba(15, 159, 136, 0.16);
  border-radius: 6px;
}

.result-stats b {
  color: var(--text);
  font-size: 14px;
}

.result-stats b.positive {
  color: var(--teal);
}

.result-stats b.negative {
  color: var(--amber);
}

.result-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.preview-toolbar p {
  color: var(--muted);
  font-size: 12px;
}

.preview-toolbar strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.processing-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  gap: 9px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #cbdcff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(36, 107, 254, 0.22);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 680ms linear infinite;
}

.zoom-tools {
  gap: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 34px;
  overflow: auto;
  background: rgba(233, 238, 245, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-frame {
  position: relative;
  display: grid;
  place-items: center;
}

#previewCanvas {
  max-width: 100%;
  max-height: 100%;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 22px 70px rgba(25, 36, 54, 0.2);
}

.annotation-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.annotation {
  position: absolute;
  display: grid;
  align-items: center;
  min-width: 28px;
  min-height: 18px;
  padding: 2px 4px;
  overflow: hidden;
  color: #111827;
  border: 1px solid rgba(36, 107, 254, 0.5);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
  pointer-events: auto;
}

.annotation.selected {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.annotation.redact-white {
  border-color: rgba(17, 24, 39, 0.28);
  background: #fff;
}

.annotation.redact-black {
  border-color: #111827;
  background: #111827;
}

.annotation.signature {
  padding: 0;
  border-color: rgba(19, 138, 93, 0.55);
  background: rgba(255, 255, 255, 0.3);
}

.annotation.signature img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.render-state {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}

.status-strip {
  min-height: 48px;
  font-size: 13px;
}

.status-strip > div:first-child {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.busy {
  background: var(--blue);
}

.status-dot.warn {
  background: var(--amber);
}

.status-dot.error {
  background: var(--danger);
}

#statusText {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  width: 180px;
  height: 8px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 180ms ease;
}

.progress-track span.busy {
  background-image: linear-gradient(90deg, var(--blue), var(--teal), var(--blue));
  background-size: 180% 100%;
  animation: shimmer 900ms ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 180% 50%;
  }
}

.inspector {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-left: 1px solid var(--line);
  overflow: auto;
}

.setting-block,
.size-panel,
.notice {
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  background: var(--surface-soft);
  border-radius: var(--radius);
}

.inspector-tabs button {
  min-height: 32px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 780;
}

.inspector-tabs button.active {
  color: #fff;
  background: var(--text);
}

.inspector-panel {
  display: contents;
}

.setting-label,
.range-row label {
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.tool-readout {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 800;
}

textarea,
.support-form input,
.support-form select,
.modal input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  font: inherit;
}

textarea {
  margin-top: 10px;
  padding: 10px;
  resize: vertical;
}

textarea:focus,
.support-form input:focus,
.support-form select:focus,
.modal input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(36, 107, 254, 0.16);
}

.clerk-auth-mount {
  margin-top: 14px;
}

.wide-button {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 760;
}

.wide-button.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.wide-button.subtle {
  color: var(--muted);
  background: transparent;
}

.check-row.compact {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 650;
}

.annotation-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.annotation-item {
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.annotation-item button {
  width: 28px;
  height: 28px;
  color: var(--danger);
  background: transparent;
  border-radius: 6px;
}

.access-status strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 18px;
}

.pricing-stack {
  display: grid;
  gap: 10px;
}

.price-card {
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.price-card:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  box-shadow: 0 10px 26px rgba(49, 92, 246, 0.1);
}

.price-card.highlighted {
  border-color: #bcd0ff;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.08);
}

.price-card span,
.price-card p {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.price-card strong {
  display: block;
  margin: 4px 0;
  font-size: 21px;
}

.support-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: var(--radius);
}

.segmented button {
  min-height: 32px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 760;
}

.segmented button.active {
  color: #fff;
  background: var(--text);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.16);
}

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

.quick-tools,
.capability-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

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

.quick-tools button,
.capability-grid span {
  min-height: 32px;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 760;
}

.quick-tools button {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.quick-tools button:hover {
  border-color: var(--blue);
}

.capability-grid span {
  display: flex;
  align-items: center;
  color: var(--blue-dark);
  background: #eef4ff;
  border: 1px solid #cbdcff;
}

.range-row output {
  color: var(--blue);
  font-size: 13px;
  font-weight: 780;
}

input[type="range"] {
  width: 100%;
  margin: 12px 0 7px;
  accent-color: var(--blue);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.checks {
  display: grid;
  gap: 12px;
}

.check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.check-row input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.size-panel {
  display: grid;
  gap: 8px;
}

.size-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.size-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.size-panel strong {
  font-size: 18px;
}

#savedPercent.positive {
  color: var(--green);
}

#savedPercent.negative {
  color: var(--danger);
}

.notice {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  color: var(--amber);
  background: var(--amber-bg);
  border-color: #f1d59a;
}

.notice p {
  color: #745119;
  font-size: 12px;
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.48);
}

.modal,
.signature-modal,
.support-modal {
  position: relative;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 30px 100px rgba(17, 24, 39, 0.28);
}

.modal {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: var(--radius);
  font-size: 24px;
  line-height: 1;
}

.modal-auth,
.modal-plans,
.signature-modal,
.support-modal {
  padding: 26px;
}

.modal-auth {
  border-right: 1px solid var(--line);
}

.modal-auth h2,
.signature-modal h2,
.support-modal h2 {
  font-size: 26px;
  line-height: 1.15;
}

.modal-auth p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.unlock-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(82px, 0.72fr);
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  background: #f7fbfa;
  border: 1px solid rgba(15, 159, 136, 0.24);
  border-radius: var(--radius);
}

.unlock-result div {
  display: grid;
  gap: 3px;
}

.unlock-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.unlock-result strong {
  color: var(--text);
  font-size: 18px;
}

.size-arrow {
  color: var(--teal);
  font-size: 20px;
  font-weight: 900;
}

.unlock-result strong.positive {
  color: var(--teal);
}

.unlock-result strong.negative {
  color: var(--amber);
}

.unlock-result p {
  grid-column: 1 / -1;
  margin-top: 0;
  color: #315c52;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.modal-auth label {
  display: block;
  margin-top: 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.modal-auth input {
  min-height: 42px;
  margin-top: 8px;
  padding: 0 12px;
}

.modal-note {
  margin-top: 12px;
  padding: 10px;
  color: #745119;
  background: var(--amber-bg);
  border: 1px solid #f1d59a;
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.4;
}

.checkout-stage {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 12px;
  color: #2447c9;
  background: #eef4ff;
  border: 1px solid #cbdcff;
  border-radius: var(--radius);
}

.checkout-stage strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.checkout-stage p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.modal-plans {
  display: grid;
  gap: 10px;
}

.local-pricing-note {
  padding: 9px 10px;
  color: var(--muted);
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 760;
}

.plan-button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 14px;
  min-height: 82px;
  padding: 14px;
  text-align: left;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plan-button.recommended {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.1);
}

.plan-button.is-loading {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.plan-button.is-loading strong,
.plan-button.is-loading small,
.plan-button.is-loading span {
  color: #fff;
}

.plan-button.is-loading::after {
  content: "Preparing";
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 800;
}

.plan-button span {
  font-size: 14px;
  font-weight: 800;
}

.plan-button strong {
  color: var(--blue);
  font-size: 22px;
}

.plan-button small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.signature-modal {
  width: min(720px, 100%);
}

.support-modal {
  width: min(620px, 100%);
}

.support-modal label {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.support-modal input,
.support-modal textarea {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
}

.as-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#signatureCanvas {
  width: 100%;
  height: 220px;
  margin-top: 18px;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  touch-action: none;
}

.signature-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.legal-page {
  width: min(760px, calc(100% - 32px));
  margin: 42px auto;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
}

.legal-page h1 {
  margin: 14px 0 4px;
  font-size: 38px;
  line-height: 1.05;
}

.legal-page h2 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.legal-page p {
  color: var(--muted);
  line-height: 1.65;
}

.legal-page ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.legal-page li::marker {
  color: var(--teal);
}

.legal-page a {
  color: var(--blue);
  font-weight: 760;
  text-decoration: none;
}

.legal-back {
  display: inline-flex;
  margin-bottom: 8px;
}

.support-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 20px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.support-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
}

.support-form input,
.support-form select {
  min-height: 42px;
  padding: 0 12px;
  background: #fff;
}

.support-form textarea {
  margin-top: 0;
}

.support-form button {
  min-height: 46px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 850;
}

.support-form-note {
  margin: 0;
  font-size: 13px;
}

.support-form-note.sent {
  color: var(--green);
}

.support-form-note.error {
  color: var(--danger);
}

@media (max-width: 1480px) {
  .toolbar .editor-tool span,
  #selectAllButton span,
  #invertButton span {
    display: none;
  }

  .toolbar .tool-button {
    width: 38px;
    padding: 0;
  }

  .toolbar #openButton {
    width: auto;
    padding: 0 12px;
  }
}

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

  .seo-nav {
    display: none;
  }

  .seo-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
  }

  .seo-copy {
    text-align: center;
  }

  .seo-copy h1,
  .seo-copy p,
  .seo-proof-list {
    margin-right: auto;
    margin-left: auto;
  }

  .seo-bite-meter {
    margin-right: auto;
    margin-left: auto;
  }

  .app-shell {
    grid-template-columns: minmax(220px, 270px) minmax(380px, 1fr);
    grid-template-rows: 64px minmax(0, 1fr) auto;
    min-height: 820px;
  }

  .topbar {
    grid-template-columns: minmax(190px, 250px) minmax(220px, 1fr) auto;
  }

  .inspector {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    align-items: start;
    max-height: 300px;
  }

  .inspector-heading {
    grid-column: 1 / -1;
  }

  .inspector-tabs {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .seo-header,
  .seo-hero,
  .seo-steps {
    width: calc(100% - 32px);
  }

  .seo-hero {
    gap: 30px;
    padding-top: 32px;
  }

  .seo-copy h1 {
    max-width: 520px;
    font-size: clamp(36px, 7vw, 52px);
  }

  .seo-bite-meter {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 390px;
  }

  .seo-bite-meter i {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .seo-header {
    width: calc(100% - 28px);
    min-height: 62px;
  }

  .seo-brand {
    font-size: 18px;
  }

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

  .seo-login {
    min-height: 38px;
    padding: 0 14px;
  }

  .seo-account {
    max-width: 150px;
    min-height: 38px;
    padding: 5px 6px 5px 10px;
  }

  .seo-account span {
    display: none;
  }

  .seo-hero,
  .seo-steps,
  .seo-trust {
    width: calc(100% - 28px);
  }

  .seo-hero {
    gap: 28px;
    padding: 28px 0 52px;
  }

  .seo-copy h1 {
    max-width: 330px;
    font-size: clamp(31px, 9vw, 38px);
    line-height: 1.02;
  }

  .seo-copy p {
    max-width: 340px;
    font-size: 17px;
  }

  .seo-bite-meter {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 340px;
  }

  .seo-bite-meter i {
    width: 100%;
  }

  .seo-proof-list {
    width: 100%;
    max-width: 340px;
    gap: 12px;
    text-align: left;
  }

  .seo-proof-list li {
    font-size: 15px;
  }

  .seo-dropzone {
    min-height: 390px;
    padding: 34px 22px;
  }

  .seo-drop-label {
    justify-self: center;
    margin: -12px 0 0;
  }

  .seo-dropzone::before {
    inset: 14px;
  }

  .seo-step-grid {
    grid-template-columns: 1fr;
  }

  .seo-trust {
    display: grid;
    margin-top: -28px;
    text-align: center;
  }

  .seo-trust div {
    justify-content: center;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .topbar {
    display: flex;
    flex-wrap: wrap;
    height: auto;
    padding: 12px;
  }

  .brand {
    width: 100%;
  }

  .toolbar,
  .top-actions {
    flex: 1 1 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .tool-button {
    flex: 1 1 30%;
    padding: 0 10px;
  }

  .toolbar-divider {
    display: none;
  }

  .left-rail,
  .inspector,
  .workspace {
    width: 100%;
    min-height: auto;
    border: 0;
  }

  .left-rail {
    max-height: 420px;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    min-height: 560px;
  }

  .inspector {
    display: flex;
    max-height: none;
  }

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

  .entry-hero h2 {
    font-size: 34px;
  }

  .result-dock {
    grid-template-columns: 1fr;
  }

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

  .modal-auth {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .drop-screen {
    padding: 18px;
  }

  .drop-panel {
    padding: 28px 20px;
  }

  .editor {
    padding: 12px;
  }

  .preview-toolbar {
    flex-wrap: wrap;
  }

  .processing-pill {
    order: 3;
    width: 100%;
  }

  .preview-stage {
    padding: 18px;
  }

  .progress-track {
    width: 110px;
  }
}
