
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #111827;
  --muted: #667085;
  --line: #e4e7ec;
  --brand: #5b5bf7;
  --brand-dark: #4545d8;
  --green: #12a06a;
  --danger: #d92d20;
  --shadow: 0 24px 70px rgba(16, 24, 40, .10);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 750; }
.brand strong { color: var(--brand); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center; color: white;
  background: linear-gradient(145deg, #7070ff, #4646d5);
  box-shadow: 0 9px 20px rgba(91,91,247,.26);
}
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 14px; color: #475467; }
.site-header nav a:hover { color: var(--ink); }
.nav-cta {
  padding: 10px 16px; color: white !important; border-radius: 10px;
  background: var(--ink);
}

.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: 570px;
  margin: 25px auto 70px;
  padding: 64px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 60px;
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.5), transparent 33%),
    linear-gradient(135deg, #e9e8ff 0%, #dfe8ff 50%, #eafaf4 100%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand); font-weight: 800; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase;
}
.hero h1 {
  margin: 18px 0 20px;
  max-width: 650px;
  font-size: clamp(44px, 6vw, 72px);
  line-height: .98;
  letter-spacing: -.055em;
}
.hero-copy > p {
  max-width: 610px;
  color: #475467;
  font-size: 18px;
  line-height: 1.7;
}
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 32px; flex-wrap: wrap; }
.primary-btn {
  padding: 15px 22px; border-radius: 13px; color: white; background: var(--brand);
  font-weight: 750; box-shadow: 0 13px 28px rgba(91,91,247,.24);
}
.primary-btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.privacy-note { color: #475467; font-size: 13px; }
.trust-row { display: flex; gap: 22px; margin-top: 28px; color: #475467; font-size: 12px; font-weight: 650; }
.trust-row span::before { content: "✓"; margin-right: 7px; color: var(--green); }

.hero-card { display: grid; place-items: center; }
.mock-window {
  width: min(100%, 430px); padding: 18px; border-radius: 24px;
  background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.75);
  backdrop-filter: blur(10px); box-shadow: 0 28px 70px rgba(54,63,98,.2);
  transform: rotate(2deg);
}
.mock-top { display: flex; gap: 6px; padding: 4px 0 16px; }
.mock-top i { width: 8px; height: 8px; background: #c9ced8; border-radius: 50%; }
.mock-chat { min-height: 330px; background: white; border-radius: 17px; padding: 28px; position: relative; }
.mock-line { height: 12px; background: #eef1f6; border-radius: 20px; margin-bottom: 20px; }
.mock-line.wide { width: 92%; } .mock-line.medium { width: 70%; } .mock-line.short { width: 54%; }
.mock-sensitive {
  width: max-content; max-width: 100%;
  margin: 18px 0; padding: 9px 13px; border: 2px solid #f04438;
  color: transparent; background: #111827; border-radius: 7px;
  box-shadow: 0 0 0 4px rgba(240,68,56,.08);
}
.mock-safe-badge {
  position: absolute; right: 22px; bottom: 22px;
  padding: 10px 13px; border-radius: 999px; color: #087a4f;
  background: #e8fff5; font-size: 12px; font-weight: 800;
}

.tool-section { width: min(1240px, calc(100% - 32px)); margin: 0 auto 100px; }
.section-heading { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-heading h2 { font-size: clamp(32px, 4vw, 48px); margin: 10px 0; letter-spacing: -.04em; }
.section-heading p { color: var(--muted); line-height: 1.7; }
.section-heading.compact { margin-bottom: 30px; }

.app-shell {
  min-height: 720px;
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.control-panel { background: #fbfcfe; border-right: 1px solid var(--line); }
.panel-block { padding: 22px; border-bottom: 1px solid var(--line); }
.upload-box {
  min-height: 145px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; border: 1.5px dashed #b7bfcc; border-radius: 16px; background: white;
  transition: .2s;
}
.upload-box:hover { border-color: var(--brand); background: #f8f8ff; }
.upload-box input { display: none; }
.upload-icon {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: var(--brand); background: #efefff; border-radius: 11px;
  font-size: 22px; font-weight: 800;
}
.upload-box small { color: var(--muted); }
.block-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 13px; font-weight: 800; }
.status-pill, .count-badge {
  padding: 4px 8px; border-radius: 99px; background: #eef1f6;
  color: #475467; font-size: 11px; font-weight: 700;
}
.status-pill.scanning { background: #fff4e5; color: #b54708; }
.status-pill.done { background: #eafbf3; color: #087a4f; }

.action-btn, .download-btn, .ghost-btn {
  border: 0; border-radius: 11px; font-weight: 750; transition: .18s;
}
.action-btn {
  width: 100%; padding: 12px 14px; color: white; background: var(--brand);
}
.action-btn:hover:not(:disabled) { background: var(--brand-dark); }
button:disabled { opacity: .45; cursor: not-allowed; }
.detect-options { display: grid; gap: 10px; margin-top: 16px; color: #475467; font-size: 12px; }
.detect-options label { display: flex; gap: 8px; align-items: center; }
.detect-options input { accent-color: var(--brand); }
.progress-wrap { margin-top: 13px; }
.progress-track { height: 7px; overflow: hidden; background: #eceef3; border-radius: 99px; }
.progress-track div { width: 0; height: 100%; background: var(--brand); transition: width .2s; }
.progress-wrap small { display: block; margin-top: 7px; color: var(--muted); }

.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.style-btn {
  border: 1px solid var(--line); border-radius: 11px; background: white;
  padding: 9px 7px; color: #475467; font-size: 11px; font-weight: 750;
}
.style-btn.active { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 2px rgba(91,91,247,.1); }
.style-preview { height: 24px; display: block; border-radius: 6px; margin-bottom: 7px; background: #98a2b3; }
.blur-preview { filter: blur(4px); }
.pixel-preview {
  background:
    linear-gradient(90deg,#475467 50%,#98a2b3 50%) 0 0/8px 8px,
    linear-gradient(#667085 50%,#c0c6d0 50%) 0 0/8px 8px;
}
.solid-preview { background: #101828; }
.helper-text { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 12px 0 0; }

.redaction-list { max-height: 170px; overflow-y: auto; display: grid; gap: 8px; }
.empty-list { color: var(--muted); font-size: 12px; margin: 4px 0; }
.redaction-item {
  display: flex; align-items: center; gap: 8px; padding: 9px;
  background: white; border: 1px solid var(--line); border-radius: 9px; font-size: 11px;
}
.redaction-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.redaction-item span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.redaction-item button { border: 0; color: var(--danger); background: transparent; }
.inline-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.ghost-btn { padding: 10px; border: 1px solid var(--line); background: white; color: #475467; font-size: 11px; }
.ghost-btn:hover:not(:disabled) { border-color: #98a2b3; }
.ghost-btn.danger { color: var(--danger); }

.editor-panel { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; }
.editor-toolbar, .editor-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 17px 22px; border-bottom: 1px solid var(--line);
}
.editor-toolbar small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.zoom-controls { display: flex; align-items: center; gap: 6px; }
.zoom-controls button {
  min-width: 32px; height: 32px; border-radius: 8px; background: white;
  border: 1px solid var(--line); color: #475467;
}
#zoomLabel { min-width: 48px; text-align: center; color: var(--muted); font-size: 11px; }

.canvas-stage {
  min-height: 590px; position: relative; overflow: auto; padding: 28px;
  background:
    linear-gradient(45deg,#f4f5f7 25%,transparent 25%) 0 0/20px 20px,
    linear-gradient(45deg,transparent 75%,#f4f5f7 75%) 0 0/20px 20px,
    linear-gradient(45deg,transparent 75%,#f4f5f7 75%) -10px 10px/20px 20px,
    linear-gradient(45deg,#f4f5f7 25%,#fff 25%) -10px 10px/20px 20px;
}
.canvas-stage.empty { display: grid; place-items: center; background: #f8fafc; }
.empty-state { max-width: 400px; text-align: center; color: var(--muted); }
.empty-icon {
  width: 60px; height: 60px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 17px; background: #ececff; color: var(--brand); font-size: 28px;
}
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }
.empty-state p { font-size: 13px; line-height: 1.6; }
.secondary-upload {
  display: inline-block; margin-top: 12px; padding: 11px 16px;
  border-radius: 10px; color: var(--brand); background: #ededff; font-weight: 750; font-size: 13px;
}
.canvas-wrap { position: relative; margin: auto; transform-origin: top left; width: max-content; box-shadow: 0 18px 45px rgba(16,24,40,.18); }
.canvas-wrap canvas { display: block; max-width: none; }
#overlayCanvas { position: absolute; inset: 0; cursor: crosshair; }

.editor-footer { border-top: 1px solid var(--line); border-bottom: 0; }
.safety-message { display: flex; gap: 10px; align-items: center; }
.safety-message p { margin: 0; color: var(--muted); font-size: 11px; }
.download-btn { padding: 13px 18px; color: white; background: var(--ink); }
.download-btn:hover:not(:disabled) { background: #29303d; transform: translateY(-1px); }

.info-section { width: min(1120px, calc(100% - 40px)); margin: 0 auto 90px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps-grid article { padding: 26px; border-radius: 18px; background: white; border: 1px solid var(--line); }
.steps-grid article > span { color: var(--brand); font-size: 12px; font-weight: 850; }
.steps-grid h3 { margin: 20px 0 8px; }
.steps-grid p { color: var(--muted); font-size: 13px; line-height: 1.6; }

.privacy-section {
  width: min(1120px, calc(100% - 40px)); margin: 0 auto 100px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  padding: 48px; border-radius: 24px; color: white;
  background: #101828;
}
.privacy-section .eyebrow { color: #a5a6ff; }
.privacy-section h2 { font-size: 36px; letter-spacing: -.04em; margin-bottom: 0; }
.privacy-section p { color: #cbd1dc; line-height: 1.8; }

footer:not(.site-footer) {
  width: min(1120px, calc(100% - 40px)); margin: 0 auto;
  min-height: 110px; display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 12px;
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px);
  padding: 12px 16px; color: white; background: #101828; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 46px; }
  .hero-card { display: none; }
  .app-shell { grid-template-columns: 280px 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-header nav a:not(.nav-cta) { display: none; }
  .hero { width: min(100% - 20px, 1180px); padding: 34px 24px; min-height: 490px; margin-top: 10px; }
  .hero h1 { font-size: 48px; }
  .trust-row { flex-direction: column; gap: 8px; }
  .tool-section { width: min(100% - 14px, 1240px); }
  .app-shell { grid-template-columns: 1fr; }
  .control-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .canvas-stage { min-height: 430px; padding: 16px; }
  .editor-footer { align-items: stretch; flex-direction: column; }
  .download-btn { width: 100%; }
  .steps-grid, .privacy-section { grid-template-columns: 1fr; }
  .privacy-section { padding: 32px 24px; gap: 16px; }
  footer:not(.site-footer) { flex-direction: column; justify-content: center; gap: 12px; text-align: center; }
}

/* Compact image-sized editor layout */
.app-shell {
  min-height: 0;
  align-items: start;
  gap: 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}
.control-panel,
.editor-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.control-panel {
  border-right: 1px solid var(--line);
}
.editor-panel {
  display: block;
}
.canvas-stage {
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 24px;
}
.canvas-stage.empty {
  min-height: 520px;
  display: grid;
  place-items: center;
}
.canvas-stage:not(.empty) {
  height: auto;
}
.canvas-wrap {
  flex: 0 0 auto;
  margin: 0;
  transform: none !important;
  transform-origin: initial;
}
.editor-footer {
  margin-top: 0;
}

/* Full website footer */
.site-footer {
  width: 100%;
  margin: 0;
  padding: 64px max(24px, calc((100% - 1120px) / 2)) 24px;
  color: #cbd5e1;
  background: #0b1120;
  font-size: 14px;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.65fr) repeat(3, minmax(140px, .75fr));
  gap: 48px;
  padding-bottom: 46px;
}
.footer-about .brand {
  width: max-content;
  color: #fff;
}
.footer-about > p {
  max-width: 380px;
  margin: 20px 0 18px;
  color: #94a3b8;
  line-height: 1.75;
}
.footer-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.footer-column h3 {
  margin: 4px 0 8px;
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.footer-column a {
  color: #94a3b8;
  transition: color .18s, transform .18s;
}
.footer-column a:hover {
  color: #fff;
  transform: translateX(2px);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, .18);
  color: #64748b;
  font-size: 12px;
}
.footer-bottom p {
  margin: 0;
}

@media (max-width: 980px) {
  .footer-main {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
  .footer-column:last-child {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .app-shell {
    gap: 14px;
  }
  .control-panel {
    border-right: 1px solid var(--line);
  }
  .canvas-stage {
    min-height: 0;
    padding: 12px;
  }
  .canvas-stage.empty {
    min-height: 360px;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }
  .footer-about {
    grid-column: 1 / -1;
  }
  .footer-column:last-child {
    grid-column: auto;
  }
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .footer-main {
    grid-template-columns: 1fr;
  }
  .footer-about {
    grid-column: auto;
  }
}
