/* ==========================================================
   PrivacyFilter — Surgical Precision Design
   Aesthetic: Digital Cleanroom · Deep Navy + Electric Teal
   Fonts: Syne (display) · Barlow (body) · Fira Code (mono)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Fira+Code:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* surfaces */
  --bg:        #05101e;
  --s1:        #091828;
  --s2:        #0d2035;
  --s3:        #132844;

  /* borders */
  --b:         rgba(0, 212, 228, 0.08);
  --b2:        rgba(0, 212, 228, 0.18);
  --b3:        rgba(0, 212, 228, 0.38);

  /* accent */
  --a:         #00d4e4;
  --a-dim:     rgba(0, 212, 228, 0.10);
  --a-glow:    rgba(0, 212, 228, 0.22);
  --a-pulse:   rgba(0, 212, 228, 0.06);

  /* text */
  --t:         #d8f0f8;
  --t2:        #7aafc6;
  --t3:        #3e6a82;

  /* states */
  --ok:        #34d399;
  --err:       #f87171;

  /* entity palette */
  --ep:  #fcd34d;  /* PERSON */
  --ee:  #7dd3fc;  /* EMAIL */
  --eph: #6ee7b7;  /* PHONE */
  --ea:  #d8b4fe;  /* ADDRESS */
  --es:  #fca5a5;  /* SSN */
  --ed:  #fdba74;  /* DOB */
  --ec:  #fb923c;  /* CC */
  --ei:  #67e8f9;  /* IP */
  --eu:  #c4b5fd;  /* URL */
  --eo:  #94a3b8;  /* OTHER */

  --ff-d: 'Syne', sans-serif;
  --ff-b: 'Barlow', sans-serif;
  --ff-m: 'Fira Code', monospace;

  --r:    10px;
  --rl:   18px;
  --rx:   26px;
  --sh:   0 4px 32px rgba(0,0,0,.5), 0 1px 4px rgba(0,0,0,.3);
  --gl:   0 0 60px rgba(0,212,228,.06), 0 0 120px rgba(0,212,228,.03);
  --tr:   .18s ease;
}

html { scroll-behavior: smooth; scroll-padding-top: 68px; }

body {
  font-family: var(--ff-b);
  font-weight: 400;
  background: var(--bg);
  color: var(--t);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

/* ── Background grid + glow ─────────────────────────────── */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-blobs::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,228,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,228,.025) 1px, transparent 1px);
  background-size: 44px 44px;
}

.blob { display: none; }

/* Central glow */
.bg-blobs::after {
  content: '';
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 130vw);
  height: min(700px, 100vh);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,212,228,.07) 0%, transparent 68%);
  animation: bg-pulse 9s ease-in-out infinite;
}

@keyframes bg-pulse {
  0%,100% { opacity: .75; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

body > *:not(.bg-blobs) { position: relative; z-index: 1; }

/* ── Nav ──────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: 64px;
  background: rgba(5,16,30,.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--b);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
  color: var(--t);
  text-decoration: none;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--a);
  border-radius: 8px;
  font-weight: 800;
  color: #000;
  font-size: .75rem;
  letter-spacing: 0;
  box-shadow: 0 0 18px var(--a-glow);
  flex-shrink: 0;
}

.nav-link {
  color: var(--t2);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: color var(--tr);
  margin-right: .5rem;
}

.nav-link:hover { color: var(--t); text-decoration: none; }

.nav-cta {
  background: var(--a);
  color: #000;
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .45rem 1.1rem;
  border-radius: var(--r);
  text-decoration: none;
  transition: box-shadow var(--tr), transform var(--tr);
}

.nav-cta:hover {
  box-shadow: 0 0 28px var(--a-glow);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ── Hero ─────────────────────────────────────────────────── */
#hero {
  padding: calc(64px + 4.5rem) clamp(1.25rem, 5vw, 3rem) 4.5rem;
  overflow: hidden;
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-text { flex: 1; min-width: 0; }

.hero-demo {
  flex: 0 0 420px;
  max-width: 420px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--a-dim);
  border: 1px solid var(--b2);
  border-radius: 999px;
  padding: .32rem .9rem;
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--a);
  letter-spacing: .05em;
  margin-bottom: 1.6rem;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a);
  flex-shrink: 0;
  animation: blink-dot 1.6s ease-in-out infinite;
}

@keyframes blink-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: .15; }
}

/* Hero h1 — stacked SCAN / DETECT / REDACT */
h1 {
  font-family: var(--ff-d);
  font-weight: 800;
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.025em;
  margin-bottom: 1.5rem;
}

.h1-line-1 { color: var(--t); display: block; }
.h1-line-2 { color: var(--t2); display: block; }
.h1-line-3 {
  color: var(--a);
  display: block;
  text-shadow: 0 0 48px var(--a-glow);
  position: relative;
  padding-bottom: .25rem;
}

.h1-line-3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 65%;
  height: 3px;
  background: linear-gradient(90deg, var(--a), transparent);
  border-radius: 2px;
}

/* Subtitle */
.subtitle {
  font-size: 1rem;
  color: var(--t2);
  font-weight: 300;
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 1.6rem;
}

/* Entity pills — hero */
.format-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 2rem;
}

.format-pill {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--ff-m);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .05em;
  padding: .22rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--b2);
  color: var(--t2);
  background: var(--s1);
  transition: border-color var(--tr), color var(--tr);
}

.format-pill:hover {
  border-color: var(--b3);
  color: var(--t);
}

.format-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}

.pill-person::before  { background: var(--ep);  }
.pill-email::before   { background: var(--ee);  }
.pill-phone::before   { background: var(--eph); }
.pill-address::before { background: var(--ea);  }
.pill-ssn::before     { background: var(--es);  }

/* Hero CTAs */
.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-note {
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--t3);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.3rem;
  border-radius: var(--r);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--ff-b);
  transition: all var(--tr);
}

.btn:active { transform: scale(.97) !important; }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--a);
  color: #000;
  font-family: var(--ff-d);
  font-weight: 700;
  letter-spacing: .03em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 55%);
  pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 32px var(--a-glow), 0 4px 16px rgba(0,0,0,.3);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--s2);
  border: 1px solid var(--b2);
  color: var(--t2);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--a);
  color: var(--a);
  background: var(--a-dim);
  transform: translateY(-1px);
}

/* ── Demo card ────────────────────────────────────────────── */
.demo-card {
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--rl);
  overflow: hidden;
  box-shadow: var(--sh), var(--gl);
  position: relative;
}

.demo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--a), rgba(0,212,228,.4), transparent);
}

/* scan beam */
.demo-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -50%;
  height: 35%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,212,228,.04) 50%, transparent 100%);
  pointer-events: none;
  animation: demo-beam 7s ease-in-out infinite 1.5s;
  z-index: 2;
}

@keyframes demo-beam {
  0%   { top: -50%; }
  100% { top: 140%; }
}

.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .9rem;
  background: var(--s2);
  border-bottom: 1px solid var(--b);
}

.demo-filename {
  font-family: var(--ff-m);
  font-size: .7rem;
  color: var(--t3);
}

.demo-badge-converted {
  font-family: var(--ff-m);
  font-size: .66rem;
  color: var(--ok);
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.22);
  padding: .12rem .5rem;
  border-radius: 999px;
}

.demo-body {
  padding: 1.1rem 1.35rem 1.35rem;
  max-height: 280px;
  overflow-y: auto;
}

.demo-code {
  font-family: var(--ff-m);
  font-size: .77rem;
  line-height: 1.8;
  white-space: pre;
  overflow-x: auto;
  color: var(--t2);
}

.demo-cursor {
  color: var(--a);
  animation: blink .9s step-end infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── Sections ─────────────────────────────────────────────── */
section { padding: 5rem 1rem; }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── Tool section ─────────────────────────────────────────── */
#tool { padding: 0 1rem 5.5rem; }

.tool-card {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: var(--rx);
  padding: 2rem;
  box-shadow: var(--sh), var(--gl);
  position: relative;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--a) 40%, rgba(0,212,228,.5) 60%, transparent);
}

/* Checkout banners */
.checkout-banner {
  display: none;
  padding: .85rem 1.1rem;
  border-radius: var(--r);
  font-size: .875rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.checkout-banner.visible { display: block; }

#checkout-success {
  background: rgba(52,211,153,.07);
  border: 1px solid rgba(52,211,153,.22);
  color: var(--ok);
}

/* ── Redact panel ──────────────────────────────────────────── */
.redact-panel { margin-bottom: 1.25rem; }

.redact-input-wrap { display: flex; flex-direction: column; gap: .5rem; }

.redact-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-m);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t3);
}

.redact-counter {
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--t3);
  text-transform: none;
  letter-spacing: 0;
}

.redact-input {
  width: 100%;
  min-height: 220px;
  padding: 1rem 1.1rem;
  font-family: var(--ff-m);
  font-size: .82rem;
  line-height: 1.65;
  color: var(--t);
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: var(--r);
  resize: vertical;
  transition: border-color var(--tr), box-shadow var(--tr);
  position: relative;
}

.redact-input:focus {
  outline: none;
  border-color: var(--b3);
  box-shadow: 0 0 0 3px var(--a-dim);
}

.redact-input::placeholder { color: var(--t3); }

/* Controls row */
.redact-controls {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: .85rem;
}

/* Mode — custom pill buttons + hidden native select */
.mode-select { display: flex; align-items: center; gap: .6rem; }

.mode-label {
  font-family: var(--ff-m);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t3);
}

.mode-toggles {
  display: flex;
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.mode-btn {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--ff-m);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--t3);
  padding: .28rem .62rem;
  border-radius: 6px;
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}

.mode-btn:hover:not(.active) {
  color: var(--t2);
  background: rgba(255,255,255,.04);
}

.mode-btn.active {
  background: var(--a-dim);
  border-color: var(--b2);
  color: var(--a);
}

/* Hide native select visually but keep for JS */
#redact-mode { display: none; }

/* Redact button */
.redact-btn {
  padding: .8rem 1.75rem;
  font-family: var(--ff-d);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--a);
  color: #000;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--tr), transform var(--tr), opacity var(--tr);
}

.redact-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.2) 0%, transparent 55%);
  pointer-events: none;
}

.redact-btn:hover:not(:disabled) {
  box-shadow: 0 0 40px var(--a-glow), 0 4px 20px rgba(0,0,0,.3);
  transform: translateY(-1px);
}

.redact-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Progress ──────────────────────────────────────────────── */
.progress-wrap { margin-top: 1.25rem; display: none; }
.progress-wrap.visible { display: block; }

.progress-label {
  font-size: .76rem;
  color: var(--t2);
  margin-bottom: .5rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-m);
  letter-spacing: .04em;
}

.progress-bar-bg {
  height: 3px;
  background: var(--s3);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--a);
  border-radius: 999px;
  width: 0%;
  transition: width .25s ease;
  box-shadow: 0 0 12px var(--a-glow), 0 0 24px rgba(0,212,228,.12);
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--a);
  filter: blur(5px);
}

/* ── Conversion counter ────────────────────────────────────── */
.conversion-counter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--t3);
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--b);
}

.counter-dots { display: flex; gap: .35rem; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--s3);
  border: 1px solid var(--b2);
  transition: all .3s ease;
}

.dot.used {
  background: var(--a);
  border-color: var(--a);
  box-shadow: 0 0 8px var(--a-glow);
}

/* ── Error ─────────────────────────────────────────────────── */
.error-banner {
  display: none;
  margin-top: 1rem;
  padding: .8rem 1rem;
  background: rgba(248,113,113,.07);
  border: 1px solid rgba(248,113,113,.22);
  border-radius: var(--r);
  color: var(--err);
  font-size: .875rem;
  line-height: 1.45;
}

.error-banner.visible { display: flex; gap: .5rem; align-items: flex-start; }

/* ── Output section ───────────────────────────────────────── */
.output-section { margin-top: 1.75rem; display: none; }
.output-section.visible { display: block; }

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.output-meta {
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--t3);
}

.output-meta strong { color: var(--t2); }

.output-actions { display: flex; gap: .5rem; align-items: center; }

.copy-feedback {
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--ok);
  opacity: 0;
  transition: opacity .3s ease;
  align-self: center;
}

.copy-feedback.show { opacity: 1; }

/* Output textarea */
.markdown-preview {
  width: 100%;
  min-height: 200px;
  max-height: 420px;
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  color: var(--a);
  font-family: var(--ff-m);
  font-size: .8rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color var(--tr);
}

.markdown-preview:focus { border-color: var(--b2); }

/* ── Entity table ──────────────────────────────────────────── */
.entity-table-wrap {
  margin-top: 1.25rem;
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 1rem 1.2rem;
}

.entity-table-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .75rem;
}

.entity-table-header strong {
  font-family: var(--ff-m);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t3);
}

.entity-table-sub {
  font-family: var(--ff-m);
  font-size: .68rem;
  color: var(--t3);
}

.entity-row {
  display: grid;
  grid-template-columns: 100px 1fr auto 1fr;
  gap: .65rem;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid var(--b);
  font-size: .84rem;
}

.entity-row:last-child { border-bottom: none; }

.entity-type {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 5px;
  font-family: var(--ff-m);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-align: center;
  border: 1px solid transparent;
}

.entity-original,
.entity-replacement {
  font-family: var(--ff-m);
  font-size: .78rem;
  word-break: break-word;
}

.entity-original  { color: var(--t2); text-decoration: line-through; }
.entity-replacement { color: var(--t); }
.entity-arrow { color: var(--t3); font-size: .85rem; }

.entity-empty {
  text-align: center;
  color: var(--t3);
  font-family: var(--ff-m);
  font-size: .8rem;
  padding: .5rem 0;
}

.entity-truncated {
  margin-top: .5rem;
  text-align: center;
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--t3);
  font-style: italic;
}

.entity-locked {
  margin-top: 1rem;
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--a-pulse);
  border: 1px dashed var(--b2);
  border-radius: var(--r);
  display: none;
}

.entity-locked .lock-icon {
  font-size: 1.25rem;
  display: block;
  margin-bottom: .4rem;
}

.entity-locked p { color: var(--t2); font-size: .875rem; margin: 0; }
.entity-locked p strong { color: var(--t); }
.entity-locked-sub { font-size: .78rem !important; color: var(--t3) !important; margin-top: .2rem !important; }
#entity-unlock-btn { margin-top: .75rem; }

/* ── License key ───────────────────────────────────────────── */
.license-key-row { margin-top: 1rem; }

.license-key-row details summary {
  cursor: pointer;
  color: var(--t3);
  font-family: var(--ff-m);
  font-size: .72rem;
  letter-spacing: .06em;
  padding: .45rem .75rem;
  user-select: none;
  list-style: none;
  transition: color var(--tr);
}

.license-key-row details summary::-webkit-details-marker { display: none; }
.license-key-row details summary::before { content: '+ '; }
.license-key-row details[open] summary::before { content: '− '; }
.license-key-row details summary:hover { color: var(--t2); }

.license-key-form {
  display: flex;
  gap: .5rem;
  margin-top: .6rem;
  flex-wrap: wrap;
  align-items: center;
}

#license-input {
  flex: 1;
  min-width: 240px;
  padding: .55rem .85rem;
  font-family: var(--ff-m);
  font-size: .78rem;
  color: var(--t);
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: var(--r);
  outline: none;
  transition: border-color var(--tr);
}

#license-input:focus { border-color: var(--b2); }

.license-feedback {
  font-family: var(--ff-m);
  font-size: .78rem;
}

.tool-trust {
  text-align: center;
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--t3);
  margin-top: 1.1rem;
  letter-spacing: .03em;
}

/* ── How it works ──────────────────────────────────────────── */
#how { padding: 5rem 1.5rem; }

#how h2 {
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 3rem;
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 860px;
  margin: 0 auto;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--s2);
  border: 1px solid var(--b2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--a);
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

.step-body h3 {
  font-family: var(--ff-d);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .45rem;
}

.step-body p {
  font-size: .845rem;
  color: var(--t2);
  line-height: 1.65;
}

.step-arrow {
  color: var(--t3);
  font-size: 1.3rem;
  padding-top: .85rem;
  flex-shrink: 0;
  opacity: .4;
}

/* ── Why section ──────────────────────────────────────────── */
#why {
  background: var(--s1);
  border-top: 1px solid var(--b);
  border-bottom: 1px solid var(--b);
}

#why h2 {
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 2.5rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.why-card {
  background: var(--bg);
  border: 1px solid var(--b);
  border-radius: var(--rl);
  padding: 1.6rem 1.4rem;
  transition: border-color var(--tr), transform var(--tr);
}

.why-card:hover {
  border-color: var(--b2);
  transform: translateY(-2px);
}

.why-icon-wrap {
  font-size: 1.35rem;
  margin-bottom: .8rem;
  display: block;
}

.why-card h3 {
  font-family: var(--ff-d);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .4rem;
}

.why-card p {
  font-size: .84rem;
  color: var(--t2);
  line-height: 1.65;
}

/* ── FAQ ──────────────────────────────────────────────────── */
#faq h2 {
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 2.5rem;
}

.faq-list { display: flex; flex-direction: column; gap: .4rem; }

details {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--tr);
}

details:hover { border-color: var(--b2); }
details[open] { border-color: var(--b2); }

summary {
  padding: .95rem 1.2rem;
  font-weight: 500;
  font-size: .9rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--t);
  user-select: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1rem;
  color: var(--a);
  flex-shrink: 0;
  transition: transform var(--tr);
}

details[open] summary::after { transform: rotate(45deg); }

.faq-answer {
  padding: .75rem 1.2rem 1rem;
  font-size: .875rem;
  color: var(--t2);
  line-height: 1.7;
  border-top: 1px solid var(--b);
}

.faq-answer code {
  font-family: var(--ff-m);
  font-size: .82em;
  background: var(--s2);
  border: 1px solid var(--b);
  padding: .1em .4em;
  border-radius: 4px;
  color: var(--a);
}

/* ── Pricing ─────────────────────────────────────────────── */
#pricing {
  background: var(--s1);
  border-top: 1px solid var(--b);
  border-bottom: 1px solid var(--b);
}

#pricing h2 {
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: .5rem;
}

.pricing-sub {
  text-align: center;
  color: var(--t2);
  font-size: .95rem;
  margin-bottom: 2.75rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  max-width: 860px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--b);
  border-radius: var(--rl);
  padding: 1.85rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color var(--tr), transform var(--tr);
  position: relative;
}

.pricing-card:hover {
  border-color: var(--b2);
  transform: translateY(-2px);
}

.pricing-card--featured {
  border-color: var(--b2);
  background: linear-gradient(135deg, var(--s1) 0%, var(--s2) 100%);
}

.pricing-card--featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--a), transparent);
  border-radius: var(--rl) var(--rl) 0 0;
}

.plan-badge {
  display: inline-block;
  font-family: var(--ff-m);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--a);
  background: var(--a-dim);
  border: 1px solid var(--b2);
  padding: .18rem .55rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.pricing-tier {
  font-family: var(--ff-m);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: .55rem;
}

.pricing-price {
  font-family: var(--ff-d);
  font-weight: 800;
  font-size: 2.3rem;
  letter-spacing: -.035em;
  line-height: 1;
  margin-bottom: .3rem;
}

.pricing-mo {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--t2);
}

.pricing-cycle {
  font-family: var(--ff-m);
  font-size: .72rem;
  color: var(--t3);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 1.75rem;
  flex: 1;
}

.pricing-features li {
  font-size: .865rem;
  color: var(--t2);
  padding-left: 1.3rem;
  position: relative;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--a);
  font-weight: 700;
  font-size: .75rem;
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
}

.pricing-note {
  text-align: center;
  font-family: var(--ff-m);
  font-size: .7rem;
  color: var(--t3);
  margin-top: 2rem;
}

/* ── Upgrade modal ──────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,16,30,.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-overlay.visible { display: flex; }

.modal {
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--rx);
  padding: 2rem 1.75rem 1.75rem;
  max-width: 560px;
  width: 100%;
  box-shadow: var(--sh), 0 0 80px rgba(0,212,228,.07);
  position: relative;
  animation: modal-up .3s cubic-bezier(.34,1.48,.64,1) both;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

@keyframes modal-up {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--a) 35%, rgba(0,212,228,.5) 65%, transparent);
  border-radius: var(--rx) var(--rx) 0 0;
  pointer-events: none;
}

/* Close button */
.modal-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--s2);
  border: 1px solid var(--b);
  color: var(--t3);
  font-size: .8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr);
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}
.modal-close:hover { border-color: var(--b2); color: var(--t2); }

/* Drag handle — mobile only */
.modal-handle {
  display: none;
  width: 34px;
  height: 3px;
  background: var(--b3);
  border-radius: 2px;
  margin: 0 auto .9rem;
}

/* Modal header */
.modal-header { text-align: center; margin-bottom: 1.4rem; }

.modal-icon { font-size: 1.65rem; margin-bottom: .6rem; }

.modal-header h2 {
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -.018em;
  margin-bottom: .3rem;
}

.modal-header p {
  color: var(--t2);
  font-size: .845rem;
  line-height: 1.55;
  margin: 0;
}

/* Plan cards — 2 cols desktop, 1 col mobile */
.plan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}

.plan-card {
  background: var(--s2);
  border: 1px solid var(--b);
  border-radius: var(--rl);
  padding: 1.2rem 1.1rem;
  text-align: left;
  transition: border-color var(--tr), transform var(--tr);
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan-card:hover { border-color: var(--b2); transform: translateY(-1px); }

.plan-card.featured {
  border-color: var(--b2);
  background: linear-gradient(145deg, var(--s1) 0%, var(--s2) 100%);
}

.plan-card.featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--a), transparent);
  border-radius: var(--rl) var(--rl) 0 0;
}

.plan-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .85rem;
}

.plan-card .plan-badge {
  font-family: var(--ff-m);
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--a);
  background: var(--a-dim);
  border: 1px solid var(--b2);
  padding: .14rem .48rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: .1rem;
}

.plan-card .plan-name {
  font-family: var(--ff-m);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: .2rem;
}

.plan-card .plan-price {
  font-family: var(--ff-d);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: .15rem;
}

.plan-cycle {
  font-family: var(--ff-m);
  font-size: .66rem;
  color: var(--t3);
  line-height: 1.4;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .28rem;
  margin-bottom: .9rem;
  flex: 1;
}

.plan-features li {
  font-size: .8rem;
  color: var(--t2);
  padding-left: 1.15rem;
  position: relative;
  line-height: 1.45;
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--a);
  font-size: .7rem;
  font-weight: 700;
  top: .05em;
}

.plan-card .btn {
  width: 100%;
  justify-content: center;
  font-size: .82rem;
  margin-top: auto;
}

/* Trust line */
.modal-trust {
  text-align: center;
  font-family: var(--ff-m);
  font-size: .68rem;
  color: var(--t3);
  letter-spacing: .03em;
  margin-bottom: .65rem;
}

/* Dismiss */
.modal-dismiss {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--ff-m);
  font-size: .71rem;
  color: var(--t3);
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  transition: color var(--tr);
}
.modal-dismiss:hover { color: var(--t2); }

/* ── Mobile: bottom sheet ───────────────────────────────── */
@media (max-width: 600px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
    overflow-y: unset;
  }
  .modal {
    border-radius: var(--rl) var(--rl) 0 0;
    max-width: 100%;
    max-height: 93dvh;
    padding: 1rem 1.1rem 2.25rem;
    animation: modal-sheet .32s cubic-bezier(.34,1.22,.64,1) both;
  }
  .modal-handle { display: block; }
  .plan-cards   { grid-template-columns: 1fr; }
  /* Monthly first — reorder via order */
  .plan-card.featured { order: -1; }
}

@keyframes modal-sheet {
  from { transform: translateY(100%); opacity: .7; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Nudge toast ─────────────────────────────────────────── */
#nudge-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  max-width: 360px;
  width: calc(100vw - 3rem);
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--rl);
  box-shadow: var(--sh);
  padding: 1rem 1.1rem;
  transform: translateY(calc(100% + 2rem));
  opacity: 0;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
  pointer-events: none;
}

#nudge-toast.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nudge-inner { display: flex; flex-direction: column; gap: .6rem; }

.nudge-msg {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--t2);
  line-height: 1.45;
}

.nudge-msg strong { color: var(--t); }
.nudge-emoji { font-size: 1.05rem; flex-shrink: 0; }

.nudge-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.nudge-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .75rem;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity var(--tr), transform var(--tr);
  text-decoration: none;
}

.nudge-btn:hover { opacity: .85; transform: translateY(-1px); }

.nudge-btn-primary {
  background: var(--a);
  color: #000;
}

.nudge-btn-secondary {
  background: var(--s2);
  color: var(--t2);
  border: 1px solid var(--b2);
}

.nudge-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--t3);
  font-size: .95rem;
  cursor: pointer;
  padding: .2rem .35rem;
  border-radius: 5px;
  transition: color var(--tr);
}

.nudge-dismiss:hover { color: var(--t2); }

/* ── Bottom bar ──────────────────────────────────────────── */
#bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(5,16,30,.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--b2);
  transform: translateY(110%);
  transition: transform .48s cubic-bezier(.34,1.48,.64,1);
  overflow: hidden;
}

#bottom-bar.bb-visible { transform: translateY(0); }

.bb-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(0,212,228,.025) 50%, transparent 65%);
  background-size: 200% 100%;
  animation: bb-sweep 6s ease-in-out infinite 2s;
  pointer-events: none;
}

@keyframes bb-sweep {
  0%   { background-position: -100% 0; }
  100% { background-position: 300% 0; }
}

.bb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: .85rem 2rem;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.bb-copy { font-size: .875rem; color: var(--t2); white-space: nowrap; flex-shrink: 0; }
.bb-copy strong { color: var(--t); font-weight: 700; }
.bb-note { font-family: var(--ff-m); font-size: .72rem; color: var(--t3); white-space: nowrap; flex-shrink: 0; }

@keyframes bb-glow {
  0%,100% { box-shadow: 0 0 0 0 var(--a-glow); }
  50%      { box-shadow: 0 0 0 8px rgba(0,212,228,0); }
}

.bb-cta {
  flex-shrink: 0;
  animation: bb-glow 3s ease-in-out infinite;
  white-space: nowrap;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--b);
  padding: 2rem 1.5rem;
  text-align: center;
  font-family: var(--ff-m);
  font-size: .75rem;
  color: var(--t3);
}

footer .footer-links {
  margin-top: .6rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

footer .footer-links a { color: var(--t3); text-decoration: none; transition: color var(--tr); }
footer .footer-links a:hover { color: var(--t2); }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

#hero .badge        { animation: fade-up .45s ease both .05s; }
#hero h1            { animation: fade-up .45s ease both .12s; }
#hero .subtitle     { animation: fade-up .45s ease both .18s; }
#hero .format-pills { animation: fade-up .45s ease both .24s; }
#hero .hero-ctas    { animation: fade-up .45s ease both .3s;  }
#hero .hero-demo    { animation: fade-up .6s ease both .22s;  }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-layout { flex-direction: column; gap: 2.5rem; text-align: center; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .hero-demo { flex: none; width: 100%; max-width: 500px; }
  .h1-line-3::after { left: 50%; transform: translateX(-50%); }
  .subtitle, .format-pills, .hero-ctas { margin-left: auto; margin-right: auto; }
  .format-pills { justify-content: center; }
  .hero-ctas { justify-content: center; }
  #hero { padding: 5rem 1.5rem 3rem; }
}

@media (max-width: 700px) {
  nav { padding: 0 1rem; }
  .why-grid { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); padding: 0; }
  .step { padding: 0; width: 100%; max-width: 360px; }
  .output-header { flex-direction: column; align-items: flex-start; }
  .tool-card { padding: 1.35rem; }
  .bb-inner { flex-wrap: wrap; gap: .65rem; padding: .8rem 1.25rem; justify-content: center; text-align: center; }
  .bb-copy { font-size: .82rem; white-space: normal; }
  .bb-note { display: none; }
  .bb-cta { width: 100%; justify-content: center; font-size: .9rem; }
}

@media (max-width: 640px) {
  .hero-demo { display: none; }
  #hero { padding: 3.5rem 1rem 2rem; }
  #tool { padding: 0 1rem 3.5rem; }
}

@media (max-width: 520px) {
  .entity-row { grid-template-columns: 1fr; gap: .2rem; }
  .entity-arrow { display: none; }
  .redact-controls { flex-direction: column; align-items: stretch; }
  .redact-btn { width: 100%; }
}

@media (max-width: 480px) {
  .badge { margin-bottom: 1rem; }
  h1 { font-size: 2.8rem; }
  .subtitle, .format-pills, .hero-note { display: none; }
  #hero .btn { width: 100%; justify-content: center; }
}
