html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    padding: 0;
    color: var(--primary-4);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale; 
    background-color: var(--primary-1);
  }
  
  a {
      text-decoration: none;
      cursor: pointer;
      color: inherit;
  }
  
  :root {
      --primary-1: #1e1d1e;
      --primary-2: #292829;
      --primary-3: #383838;
      --primary-4: #aeaaa9;
      --primary-5: #ffffff;
      --primary-6: #006838;
      --primary-7: #009444;
  }

  .sr-only {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
  }  

  /* ------------------------------------------------------------
   Layout helpers
------------------------------------------------------------ */

.page {
    min-height: 100vh;
    background:
      linear-gradient(120deg, var(--primary-1), var(--primary-1), var(--primary-3));
  }
  
  .container {
    width: min(1200px, calc(100% - 72px));
    margin: 0 auto;
  }
  
  @media (max-width: 900px) {
    .container {
      width: min(1200px, calc(100% - 40px));
    }
  }
  
  /* ------------------------------------------------------------
     Header
  ------------------------------------------------------------ */
  
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  
  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
  }
  
  .brand img {
    height: 22px;
    width: auto;
    display: block;
  }
  
  .nav-links {
    display: flex;
    gap: 28px;
    color: rgba(255,255,255,0.75);
    font-size: 0.95rem;
  }
  
  .nav-links a {
    opacity: 0.9;
    transition: opacity 160ms ease;
  }
  
  .nav-links a:hover {
    opacity: 1;
  }
  
  .nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  /* Hide center nav links on smaller screens (simple prototype) */
  @media (max-width: 860px) {
    .nav-links {
      display: none;
    }
  }
  
  /* ------------------------------------------------------------
     Buttons
  ------------------------------------------------------------ */
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 5px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: 0.2px;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
    user-select: none;
    -webkit-user-select: none;
  }
  
  .btn:active {
    transform: translateY(1px);
  }
  
  .btn-primary {
    background: var(--primary-6);
    color: var(--primary-5);
    border: 1px solid var(--primary-7);
  }
  
  .btn-primary:hover {
    background: var(--primary-7);
  }
  
  .btn-outline {
    background: transparent;
    color: rgba(255,255,255,0.88);
    border: 1px solid rgba(255,255,255,0.22);
  }
  
  .btn-outline:hover {
    border-color: rgba(255,255,255,0.34);
    background: rgba(255,255,255,0.04);
  }
  
  .btn-ghost {
    background: transparent;
    color: var(--primary-5);
    border: 1px solid var(--primary-3);
    padding: 10px 20px;
    border-radius: 5px;
  }
  
  .btn-ghost:hover {
    border-color: rgba(255,255,255,0.32);
    background: rgba(255,255,255,0.04);
  }
  
  .arrow {
    display: inline-block;
    transform: translateY(-1px);
    opacity: 0.9;
  }
  
  /* ------------------------------------------------------------
     Hero
  ------------------------------------------------------------ */
  
  .hero {
    padding: 66px 0 86px;
    position: relative;
  }
  
  .hero-grid {
    display: grid;
    grid-template-columns: 35% 65%;
    align-items: center;
    gap: 40px;
  }
  
  .hero-copy h1 {
    margin: 0 0 20px;
    font-size: 4rem;
    line-height: 1.2;
    color: var(--primary-5);
    font-weight: 400;
  }
  
  .lead {
    margin: 0 0 22px;
    max-width: 56ch;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--primary-4);
  }
  
  .hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 0 0 30px;
    flex-wrap: wrap;
  }
  
  /* Checklist */
  .checklist {
    list-style: none;
    padding: 0px 0px 10px 0px;
    margin: 20px 0 0;
    display: grid;
    gap: 10px;
    color: var(--primary-4);
    font-size: 0.98rem;
  }
  
  .checklist li {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: start;
    gap: 10px;
    margin-bottom: 5px;
  }
  
  .checklist .check {
    color: rgba(255,255,255,0.65);
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transform: translateY(2px);
  }
  
  /* ------------------------------------------------------------
     Hero visual (mockup card)
  ------------------------------------------------------------ */

  /* Prevent hero image interaction */
.hero-visual,
.hero-visual img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

  
  .hero-visual {
    display: flex;
    justify-content: flex-end;
  }
  
  .product-shot img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
  }
  
  /* ------------------------------------------------------------
     Responsive
  ------------------------------------------------------------ */
  
  @media (max-width: 1000px) {
    .hero-grid {
      grid-template-columns: 1fr;
      gap: 36px;
    }
  
    .hero-visual {
      justify-content: flex-start;
    }
  
    .hero {
      padding: 46px 0 72px;
    }

    .hero-copy h1 {
        font-size: 3rem;
    }
  }
  
  @media (max-width: 520px) {
    .btn {
      width: 100%;
    }
  
    .hero-actions {
      gap: 10px;
    }
  }
  
  @keyframes fadeSlideInLeft {
    from {
      opacity: 0;
      transform: translateX(-20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes fadeSlideInRight {
    from {
      opacity: 0;
      transform: translateX(20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  .hero-copy {
    animation: fadeSlideInLeft 600ms ease-out both;
  }
  
  .hero-visual {
    animation: fadeSlideInRight 600ms ease-out both;
  }
  
  @media (prefers-reduced-motion: reduce) {
    .hero-copy,
    .hero-visual {
      animation: none;
    }
  }

  @media (max-width: 1000px) {
    .hero-copy,
    .hero-visual {
      animation: none;
    }
  }
  

    /* ------------------------------------------------------------
     APP
  ------------------------------------------------------------ */

  /* Demo app wrapper */
.app {
    min-height: 100vh;
    background: var(--primary-1);
    color: var(--primary-1);
  }
  
  /* Top bar */
  .app-topbar {
    display: flex;
    width: auto;
    align-items: center; /* optional: vertical alignment */
    background-color: var(--primary-2);
    border-bottom: solid 1px var(--primary-3);
    padding: 5px 20px;
  }
  
  .topbar-left {
    flex: 0 0 auto; /* stays as wide as its content */
    display: flex;
  }
  
  .topbar-center {
    flex: 1 1 auto; /* expands to fill the middle space */
    text-align: center; 
  }
  
  .topbar-right {
    flex: 0 0 auto;
  }  
  
  .app-title {
    color: var(--primary-5);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.2px;
  }

  .demo-logo {
    width: 120px;
    margin: 5px 0px 0px 0px;
  }
  
  .icon-btn {
    padding: 8px 12px;
    border-radius: 80px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.78);
    cursor: pointer;
  }
  
  .icon-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
  }
  
  .icon {
    display: inline-block;
    transform: translateY(-1px);
  }
  
  .btn-compact {
    padding: 9px 14px;
    border-radius: 7px;
    font-weight: 400;
  }

  .upload-input {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    font: inherit;
  }
  
  /* Hide native text but keep button clickable */
  .upload-input::file-selector-button {
    all: unset;
    font: inherit;
    cursor: pointer;
  }
  
  /* Safari fallback */
  .upload-input::-webkit-file-upload-button {
    all: unset;
    font: inherit;
    cursor: pointer;
  }  
  
  .split {
    display: inline-flex;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.35);
  }
  
  .split .btn {
    border: none;
  }
  
  .split-caret {
    width: 42px;
    padding: 9px 0;
  }
  
  /* Shell */
  .app-shell {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 18px;
    padding: 18px;
  }
  
  /* Panels */
  .panel {
    border-radius: 10px;
    background: var(--primary-2);
    border: 1px solid var(--primary-3);
    overflow: hidden;
  }
  
  .panel-header {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  
  .panel-title {
    color: rgba(255,255,255,0.72);
    font-weight: 400;
    font-size: 0.88rem;
    text-align: center;
  }
  
  .panel-body {
    padding: 14px;
    display: grid;
    gap: 14px;
  }
  
  .card {
    border-radius: 10px;
    background: var(--primary-1);
    border: 1px solid var(--primary-3);
    padding: 14px;
    position: relative;
  }
  
  .pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 170px; /* gives that tall empty “workspace” feel */
    align-content: flex-start;
  }
  
  .pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.82);
    font-size: 0.9rem;
  }
  
  .pill-x {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
  }
  
  .pill-x:hover {
    color: rgba(255,255,255,0.75);
  }
  
  .card-footer-icons {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 8px;
  }
  
  .mini-icon {
    color: rgba(255,255,255,0.65);
    cursor: pointer;
  }
  
  .mini-icon:hover {
    background: rgba(255,255,255,0.05);
  }
  
  .keyword-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
  }
  
  .input {
    height: 36px;
    border-radius: 7px;
    padding: 0 12px;
    border: 1px solid var(--primary-3);
    background: var(--primary-1);
    color: var(--primary-5);
    outline: none;
  }
  
  .input::placeholder {
    color: var(--primary-4);
  }
  
  .input:focus {
    border-color: var(--primary-4); /* your primary-7 in RGBA spirit */
  }
  
  .stats-grid {
    display: grid;
    gap: 8px;
  }
  
  .stat-row {
    display: grid;
    grid-template-columns: 1fr auto;
    border: 1px solid var(--primary-3);
    border-radius: 8px;
    overflow: hidden;
  }
  
  .stat-label,
  .stat-value {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .stat-label {
    background: var(--primary-2);
    color: var(--primary-4);
    border-right: 1px solid var(--primary-3);
  }
  
  .stat-value {
    min-width: 74px;
    text-align: right;
    color: var(--primary-4);
    background: var(--primary-1);
  }
  
  .checkline {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-4);
    font-size: 0.92rem;
  }
  
  .checkline input {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-7);
  }
  
  .verify-title {
    color: rgba(255,255,255,0.72);
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 10px;
  }
  
  .verify-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    color: var(--primary-4);
    font-size: 0.9rem;
  }
  
  .verify-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
  }
  
  .vcheck {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
    transform: translateY(1px);
  }
  
  /* Document area */
  .doc-area {
    display: grid;
    grid-template-rows: auto 1fr auto;
    border-radius: 10px;
    background: var(--primary-2);
    border: 1px solid var(--primary-3);
    overflow: hidden;
  }
  
  .doc-header {
    display: grid;
    grid-template-columns: 140px 1fr 180px 200px;
    gap: 0;
    align-items: center;
    background-color: var(--primary-2);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  
  .doc-pill {
    padding: 10px 12px;
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
    border-right: 1px solid rgba(255,255,255,0.06);
  }
  
  .doc-meta {
    padding: 10px 12px;
    color: rgba(255,255,255,0.52);
    font-size: 0.85rem;
    border-right: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .doc-meta:last-child {
    border-right: none;
  }
  
  .doc-stage {
    display: grid;
    place-items: center;
    padding: 26px 18px;
    background: rgba(255,255,255,0.01);
  }
  
  .doc-page {
    width: min(720px, 92%);
    aspect-ratio: 8.5 / 11;
    background: #ffffff;
    box-shadow: 0 18px 60px rgba(0,0,0,0.45);
    position: relative;
    overflow: hidden;
  }
  
  .doc-text {
    padding: 48px 52px;
    color: #111;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  }
  
  .doc-text p {
    margin: 0 0 18px;
    font-size: 20px;
    line-height: 1.35;
  }
  
  /* Redaction blocks (purely visual placeholders) */
  .redact {
    display: inline-block;
    height: 18px;
    background: #111;
    border-radius: 1px;
    transform: translateY(2px);
    width: 48px;
    margin: 0 4px;
  }
  
  .redact.w-xs { width: 18px; }
  .redact.w-sm { width: 64px; }
  .redact.w-md { width: 120px; }
  
  /* redaction marker */
  .redaction-marker {
    position: absolute;
    right: 36px;
    top: 140px;
    color: rgba(220, 60, 60, 0.9);
    font-size: 18px;
    user-select: none;
  }
  
  /* Footer / pager */
  .doc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.10);
  }
  
  .page-indicator {
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
  }
  
  .pager {
    display: inline-flex;
    gap: 6px;
  }
  
  .pager-btn {
    padding: 2px 8px 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.70);
    cursor: pointer;
  }
  
  .pager-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.18);
  }
  
  /* Keep it simple: on smaller screens let it stack naturally */
  @media (max-width: 1000px) {
    .app-topbar {
      grid-template-columns: 160px 1fr 1fr;
      gap: 10px;
    }
  
    .app-shell {
      grid-template-columns: 1fr;
    }
  
    .doc-header {
      grid-template-columns: 120px 1fr;
    }
  
    .doc-meta:nth-child(3),
    .doc-meta:nth-child(4) {
      display: none;
    }
  }
  
  /* ------------------------------------------------------------
   PDF surface + loading + scroll
------------------------------------------------------------ */

.doc-stage {
  /* allow scroll when zoomed */
  overflow: auto;
}

/* allow the canvas to size itself to the rendered PDF viewport */
#pdf-canvas,
.pdf-surface canvas {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  display: block;
}

/* optional: center page when it fits */
.pdf-surface {
  display: grid;
  justify-content: center;
}


/* overlays */
.loading-overlay,
.empty-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.loading-overlay {
  background: rgba(255,255,255,0.82);
  opacity: 0;
  transition: opacity 160ms ease;
}

.loading-overlay.is-visible {
  opacity: 1;
}

.loading-overlay .loading-text {
  margin-top: 10px;
  font-size: 0.95rem;
  color: rgba(0,0,0,0.65);
}

.empty-overlay {
  background: rgba(255,255,255,0.92);
  color: rgba(0,0,0,0.75);
}

.empty-overlay.is-hidden {
  display: none;
}

.empty-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-sub {
  font-size: 0.95rem;
  color: rgba(0,0,0,0.55);
  text-align: center;
}

/* spinner */
.spinner {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 3px solid rgba(0,0,0,0.18);
  border-top-color: rgba(0,0,0,0.55);
  animation: spin 800ms linear infinite;
}

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

/* Redaction overlay placeholder (Step 3 will draw rectangles here) */
.redaction-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
  