/* ---------- Breadcrumb ---------- */
.crumbs {
    padding-top: 48px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .crumbs a { color: var(--gray-500); transition: color .2s var(--ease); }
  .crumbs a:hover { color: var(--purple); }
  .crumbs .sep { opacity: 0.5; }
  .crumbs .current { color: var(--purple); }

  /* ---------- Hero card ---------- */
  .hero-card {
    margin-top: 24px;
    position: relative;
    background: linear-gradient(135deg, #2a0f66 0%, #4a22a8 50%, #6934c4 100%);
    color: #fff;
    border-radius: 28px;
    padding: 56px 72px;
    overflow: hidden;
    box-shadow: 0 40px 80px -40px rgba(63, 25, 147, 0.4);
  }
  .hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 500px 300px at 85% 30%, color-mix(in srgb, var(--lilac) 30%, transparent), transparent 60%),
      radial-gradient(ellipse 400px 250px at 15% 90%, color-mix(in srgb, var(--blush) 15%, transparent), transparent 55%);
    pointer-events: none;
  }
  .hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 30% 50%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 50%, black 30%, transparent 80%);
    pointer-events: none;
  }
  .hero-card-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
  }
  .hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 24px;
  }
  .hero-pill .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--lilac);
    box-shadow: 0 0 12px var(--lilac);
  }
  .hero-card h1 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(40px, 5.2vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.015em;
    margin: 0 0 20px;
    color: #fff;
    max-width: 26ch;
  }
  .hero-card p {
    margin: 0;
    font-size: 16px;
    color: rgba(255,255,255,0.78);
    line-height: 1.55;
    max-width: 58ch;
  }

  /* ---------- Widget section ---------- */
  .widget-section {
    padding: 72px 0 48px;
    position: relative;
  }
  .widget-intro {
    text-align: center;
    margin-bottom: 40px;
  }
  .widget-intro .eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 14px;
  }
  .widget-intro h2 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(36px, 4.5vw, 60px);
    line-height: 0.95;
    letter-spacing: -0.015em;
    margin: 0 auto 16px;
    max-width: 22ch;
    color: var(--charcoal);
  }
  .widget-intro p {
    font-size: 16px;
    color: var(--gray-700);
    max-width: 58ch;
    margin: 0 auto;
  }

  /* ---------- Widget shell ---------- */
  .widget {
    background: var(--paper);
    border: 1px solid color-mix(in srgb, var(--charcoal) 7%, transparent);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 80px -30px rgba(20, 10, 50, 0.18), 0 2px 8px -2px rgba(20, 10, 50, 0.06);
    max-width: 1100px;
    margin: 0 auto;
  }
  .widget-topbar {
    height: 4px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--lilac) 50%, var(--purple) 100%);
  }
  .widget-header {
    padding: 28px 32px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
  }
  .widget-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.005em;
    color: var(--charcoal);
    margin: 0 0 6px;
    line-height: 1;
  }
  .widget-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
  }

  /* State pill on right of widget header */
  .state-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--purple-soft);
    color: var(--purple);
    font-weight: 600;
    transition: background .3s var(--ease);
  }
  .state-pill .state-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--purple);
    animation: dotPulse 1.6s ease-in-out infinite;
  }
  @keyframes dotPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
  }
  .widget.state-scanning .state-pill { background: color-mix(in srgb, var(--purple) 15%, var(--paper)); }
  .widget.state-extracted .state-pill { background: #dcfce7; color: #166534; }
  .widget.state-extracted .state-pill .state-dot { background: #22c55e; animation: none; }

  /* ---------- Stage ---------- */
  .stage {
    padding: 20px 32px 28px;
    position: relative;
  }
  .stage-inner {
    position: relative;
    min-height: 380px;
  }

  /* EMPTY / DRAGGING — full-width dropzone */
  .dropzone-full {
    border: 2px dashed var(--gray-300);
    border-radius: 16px;
    background: linear-gradient(to bottom, #fafafb, var(--paper));
    padding: 64px 32px;
    text-align: center;
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .4s var(--ease);
    overflow: hidden;
  }
  .widget.state-dragging .dropzone-full {
    border-color: var(--purple);
    border-style: solid;
    background: var(--purple-soft);
  }
  .widget.state-loaded .dropzone-full,
  .widget.state-scanning .dropzone-full,
  .widget.state-extracted .dropzone-full { display: none; }

  .dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .dropzone-icon {
    width: 64px; height: 64px;
    border-radius: 14px;
    background: var(--purple-soft);
    color: var(--purple);
    display: grid;
    place-items: center;
    transition: transform .3s var(--ease);
  }
  .widget.state-dragging .dropzone-icon {
    transform: scale(1.1);
    background: #fff;
  }
  .dropzone-title {
    font-family: var(--sans);
    font-size: 19px;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: -0.005em;
  }
  .dropzone-sub {
    font-size: 14px;
    color: var(--gray-500);
  }
  .dropzone-sub a {
    color: var(--charcoal);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
  }
  .dropzone-badge {
    margin-top: 4px;
    padding: 6px 14px;
    background: var(--purple-soft);
    color: var(--purple);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
  }

  /* Floating file that drags into the zone */
  .floating-file {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%) rotate(-4deg) scale(0.8);
    width: 180px;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
  }
  .widget.state-dragging .floating-file {
    animation: filePlunge 1.8s var(--ease) forwards;
  }
  @keyframes filePlunge {
    0%   { transform: translate(-50%, -120%) rotate(-14deg) scale(0.65); opacity: 0; }
    15%  { opacity: 1; }
    60%  { transform: translate(-50%, 40%) rotate(-2deg) scale(1); }
    85%  { transform: translate(-50%, 90%) rotate(0deg) scale(0.9); opacity: 1; }
    100% { transform: translate(-50%, 140%) rotate(0deg) scale(0.4); opacity: 0; }
  }
  .file-visual {
    background: var(--paper);
    border-radius: 8px;
    box-shadow: 0 30px 60px -15px rgba(20, 10, 50, 0.35), 0 0 0 1px var(--gray-200);
    padding: 16px;
    position: relative;
  }
  .file-visual::before {
    content: "PDF";
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    background: #DC2626;
    color: #fff;
    border-radius: 3px;
    letter-spacing: 0.05em;
  }
  .file-visual-name {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--charcoal);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
  }
  .file-visual-name::before {
    content: "";
    position: absolute;
    top: -4px; left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px; height: 8px;
    background: var(--charcoal);
  }
  .file-lines-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 32px;
  }
  .file-lines-preview span {
    height: 3px;
    background: var(--gray-200);
    border-radius: 1px;
  }
  .file-lines-preview span:nth-child(1) { width: 100%; background: var(--charcoal); height: 5px; margin-bottom: 3px; }
  .file-lines-preview span:nth-child(2) { width: 50%; background: var(--gray-400); height: 3px; margin-bottom: 4px; }
  .file-lines-preview span:nth-child(3) { width: 95%; }
  .file-lines-preview span:nth-child(4) { width: 85%; }
  .file-lines-preview span:nth-child(5) { width: 92%; }
  .file-lines-preview span:nth-child(6) { width: 70%; }
  .file-lines-preview span:nth-child(7) { width: 88%; }

  /* LOADED / SCANNING / EXTRACTED — split view */
  .split-view {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 380px;
    opacity: 0;
    transition: opacity .5s var(--ease);
  }
  .widget.state-loaded .split-view,
  .widget.state-scanning .split-view,
  .widget.state-extracted .split-view {
    display: grid;
    opacity: 1;
  }

  /* Document preview panel (left) */
  .preview-panel {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
  }
  .panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-500);
    font-weight: 600;
  }
  .panel-head-left { display: flex; align-items: center; gap: 8px; color: var(--purple); }
  .panel-head-right { color: var(--gray-400); font-size: 10.5px; }

  [lang="ar"] {
    font-family: var(--arabic);
  }
  [lang="ar"] strong {
    font-weight: 700;
  }
  /* Tighten Arabic line-height a touch — Naskh ascenders are tall */
  [lang="ar"] .doc-body { line-height: 1.7; font-size: 10.5px; }
  [lang="ar"] .doc-meta-line { font-size: 10.5px; }
  [lang="ar"] .doc-date { font-size: 10.5px; text-align: left; }
  [lang="ar"] .doc-title { font-size: 13px; }
  [lang="ar"] .doc-salutation { font-size: 10.5px; }
  [lang="ar"] .doc-signature-line { font-family: var(--arabic); font-style: italic; font-size: 14px; }
  [lang="ar"] .doc-signature-name { font-size: 10.5px; }
  [lang="ar"] .doc-signature-title { font-size: 9.5px; }
  [lang="ar"] .doc-letterhead-text small { font-size: 8.5px; }
  [lang="ar"] .ext-h1 { font-size: 16px; }
  [lang="ar"] .ext-meta,
  [lang="ar"] .ext-p { font-size: 12.5px; line-height: 1.7; }
  [lang="ar"] .ext-signoff strong { font-size: 12.5px; }
  [lang="ar"] .ext-signoff small { font-size: 10.5px; }

  .document {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: 0 2px 8px rgba(20,10,50,0.04), 0 0 0 1px var(--gray-100);
    position: relative;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 10.5px;
    line-height: 1.55;
    color: var(--charcoal);
    flex: 1;
    min-height: 340px;
    overflow: hidden;
  }

  .doc-letterhead {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--charcoal);
    margin-bottom: 14px;
  }
  .doc-logo {
    width: 28px; height: 28px;
    background: var(--purple);
    color: #fff;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-weight: 800;
    font-size: 14px;
  }
  .doc-letterhead-text {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: 0.02em;
    line-height: 1.2;
  }
  .doc-letterhead-text small {
    display: block;
    font-weight: 400;
    font-size: 8.5px;
    color: var(--gray-500);
    margin-top: 1px;
    letter-spacing: 0;
  }

  .doc-date {
    text-align: right;
    font-size: 9.5px;
    color: var(--gray-700);
    margin-bottom: 12px;
  }
  .doc-meta-line {
    font-size: 9.5px;
    line-height: 1.4;
    color: var(--charcoal);
  }
  .doc-meta-line strong { font-weight: 700; }

  .doc-title {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    margin: 12px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--charcoal);
  }

  .doc-salutation {
    margin-bottom: 8px;
    font-size: 10.5px;
  }

  .doc-body {
    font-size: 10px;
    line-height: 1.6;
    text-align: justify;
    color: #2a2a2f;
    margin-bottom: 10px;
  }

  .doc-signature {
    margin-top: 16px;
  }
  .doc-signature-line {
    font-family: var(--handwriting);
    font-size: 20px;
    line-height: 1;
    color: #1a3a7a;
    margin-bottom: 2px;
    transform: rotate(-2deg);
    display: inline-block;
  }
  .doc-signature-name {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 1px;
  }
  .doc-signature-title {
    font-size: 8.5px;
    color: var(--gray-500);
    font-style: italic;
  }

  /* Scan line */
  .scan-line {
    position: absolute;
    left: 0; right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--purple) 20%, var(--lilac) 50%, var(--purple) 80%, transparent 100%);
    box-shadow: 0 0 24px 6px color-mix(in srgb, var(--purple) 60%, transparent),
                0 10px 24px -4px color-mix(in srgb, var(--lilac) 40%, transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
  }
  .widget.state-scanning .scan-line {
    animation: scanSweep 2.4s var(--ease);
  }
  @keyframes scanSweep {
    0%   { opacity: 0; top: -8px; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { opacity: 0; top: calc(100% + 8px); }
  }

  /* Scan highlight boxes on document — represent detected text regions */
  .detect-box {
    position: absolute;
    border: 1.5px solid var(--purple);
    background: color-mix(in srgb, var(--lilac) 25%, transparent);
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity .25s var(--ease);
  }
  .widget.state-scanning .detect-box { opacity: 1; }
  .widget.state-scanning .detect-box:nth-of-type(1) { animation: boxFade 2.4s var(--ease); animation-delay: 0.25s; animation-fill-mode: both; }
  .widget.state-scanning .detect-box:nth-of-type(2) { animation: boxFade 2.4s var(--ease); animation-delay: 0.55s; animation-fill-mode: both; }
  .widget.state-scanning .detect-box:nth-of-type(3) { animation: boxFade 2.4s var(--ease); animation-delay: 0.85s; animation-fill-mode: both; }
  .widget.state-scanning .detect-box:nth-of-type(4) { animation: boxFade 2.4s var(--ease); animation-delay: 1.15s; animation-fill-mode: both; }
  .widget.state-scanning .detect-box:nth-of-type(5) { animation: boxFade 2.4s var(--ease); animation-delay: 1.45s; animation-fill-mode: both; }
  .widget.state-scanning .detect-box:nth-of-type(6) { animation: boxFade 2.4s var(--ease); animation-delay: 1.75s; animation-fill-mode: both; }
  @keyframes boxFade {
    0%, 100% { opacity: 0; }
    20%, 70% { opacity: 1; }
  }

  /* Text output panel (right) */
  .output-panel {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
  }
  .output-content {
    background: #fff;
    border-radius: 10px;
    padding: 28px 30px;
    flex: 1;
    min-height: 340px;
    box-shadow: 0 2px 8px rgba(20,10,50,0.04), 0 0 0 1px var(--gray-100);
    position: relative;
    overflow: hidden;
  }
  .output-empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--gray-400);
    font-size: 13px;
    text-align: center;
    padding: 20px;
  }
  .output-empty svg { margin-bottom: 10px; }
  .widget.state-extracted .output-empty { display: none; }

  .output-extracted {
    display: none;
  }
  .widget.state-extracted .output-extracted { display: block; }

  .ext-line {
    opacity: 0;
    transform: translateY(6px);
    animation: extFadeIn 0.4s var(--ease) forwards;
  }
  @keyframes extFadeIn {
    to { opacity: 1; transform: none; }
  }
  .widget.state-extracted .ext-line:nth-child(1) { animation-delay: 0.1s; }
  .widget.state-extracted .ext-line:nth-child(2) { animation-delay: 0.25s; }
  .widget.state-extracted .ext-line:nth-child(3) { animation-delay: 0.4s; }
  .widget.state-extracted .ext-line:nth-child(4) { animation-delay: 0.55s; }
  .widget.state-extracted .ext-line:nth-child(5) { animation-delay: 0.7s; }
  .widget.state-extracted .ext-line:nth-child(6) { animation-delay: 0.85s; }
  .widget.state-extracted .ext-line:nth-child(7) { animation-delay: 1s; }
  .widget.state-extracted .ext-line:nth-child(8) { animation-delay: 1.15s; }
  .widget.state-extracted .ext-line:nth-child(9) { animation-delay: 1.3s; }
  .widget.state-extracted .ext-line:nth-child(10) { animation-delay: 1.45s; }

  .ext-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--purple);
    background: var(--purple-soft);
    padding: 2px 7px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 8px;
  }
  .ext-h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--charcoal);
    margin-bottom: 12px;
    line-height: 1.2;
  }
  .ext-meta {
    font-size: 12px;
    color: var(--gray-700);
    margin-bottom: 8px;
  }
  .ext-meta strong { color: var(--charcoal); font-weight: 600; }
  .ext-subject {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--charcoal);
    margin: 14px 0 10px;
  }
  .ext-p {
    font-size: 12px;
    line-height: 1.55;
    color: var(--charcoal);
    margin-bottom: 10px;
  }
  .ext-signoff {
    margin-top: 14px;
    font-size: 12px;
    color: var(--charcoal);
  }
  .ext-signoff strong { font-weight: 700; }
  .ext-signoff small { display: block; font-size: 10.5px; color: var(--gray-500); font-weight: 400; margin-top: 1px; }

  .output-footer {
    display: flex;
    gap: 6px;
    padding-top: 12px;
    margin-top: 8px;
  }
  .format-chip {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    background: var(--paper);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: all .2s var(--ease);
  }
  .format-chip:hover { border-color: var(--purple); color: var(--purple); }
  .format-chip.active { background: var(--purple); color: #fff; border-color: var(--purple); }

  /* Action button */
  .action-btn {
    margin: 4px 32px 28px;
    width: calc(100% - 64px);
    padding: 16px;
    background: var(--purple-soft);
    color: var(--gray-500);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all .3s var(--ease);
  }
  .widget.state-loaded .action-btn,
  .widget.state-scanning .action-btn {
    background: var(--purple);
    color: #fff;
  }
  .widget.state-loaded .action-btn { animation: actionPulse 1.2s var(--ease) infinite; }
  @keyframes actionPulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--purple) 35%, transparent); }
    50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--purple) 0%, transparent); }
  }
  .widget.state-extracted .action-btn {
    background: #dcfce7;
    color: #166534;
  }
  .widget.state-scanning .action-btn .icon-scan { animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ---------- Section shell ---------- */
  section.sec { padding: 100px 0; }
  .section-head {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 64px;
  }
  .section-index {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--purple);
    padding-top: 8px;
  }
  .section-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 0.95;
    letter-spacing: -0.015em;
    color: var(--charcoal);
    max-width: 18ch;
    margin: 0;
  }
  .section-intro {
    margin-top: 20px;
    font-size: 17px;
    color: var(--gray-700);
    max-width: 58ch;
  }

  /* Features */
  .features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: color-mix(in srgb, var(--charcoal) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--charcoal) 10%, transparent);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
  .feature {
    background: var(--paper);
    padding: 44px 36px 40px;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    transition: background .3s var(--ease);
  }
  .feature:hover { background: var(--cream); }
  .feature-icon {
    width: 52px; height: 52px;
    background: var(--purple);
    color: #fff;
    border-radius: 13px;
    display: grid;
    place-items: center;
    margin-bottom: 28px;
  }
  .feature h3 {
    font-family: var(--display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.005em;
    line-height: 1;
    margin: 0 0 14px;
    color: var(--charcoal);
  }
  .feature p {
    font-size: 14.5px;
    color: var(--gray-700);
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
  }
  .feature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .feature-list-item {
    font-size: 13px;
    color: var(--charcoal);
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 10px;
    align-items: start;
  }
  .feature-list-item svg { color: var(--purple); margin-top: 4px; }

  /* Doc types */
  .doc-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .doc-type {
    background: var(--paper);
    border: 1px solid var(--gray-100);
    border-radius: 14px;
    padding: 24px;
    transition: all .3s var(--ease);
  }
  .doc-type:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
  }
  .doc-type-icon {
    width: 36px; height: 36px;
    background: var(--purple-soft);
    color: var(--purple);
    border-radius: 9px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
  }
  .doc-type h4 {
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin: 0 0 4px;
    color: var(--charcoal);
  }
  .doc-type p {
    margin: 0;
    font-size: 12.5px;
    color: var(--gray-500);
    line-height: 1.4;
  }

  /* I/O coverage */
  .io-coverage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: color-mix(in srgb, var(--charcoal) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--charcoal) 10%, transparent);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
  .io-block {
    background: var(--paper);
    padding: 40px 36px 44px;
  }
  .io-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 14px;
  }
  .io-block h3 {
    font-family: var(--display);
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 14px;
    color: var(--charcoal);
    letter-spacing: -0.005em;
  }
  .io-block p {
    font-size: 14.5px;
    color: var(--gray-700);
    line-height: 1.55;
    margin: 0 0 24px;
  }
  .io-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .io-chip {
    padding: 8px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.03em;
    color: var(--charcoal);
    font-weight: 500;
    transition: all .2s var(--ease);
  }
  .io-chip:hover { border-color: var(--purple); color: var(--purple); }
  .io-chip.primary {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
  }

  /* Enterprise strip */
  .enterprise {
    background: var(--cosmic);
    color: #fff;
    border-radius: 28px;
    margin: 0 32px;
    padding: 80px 64px;
    position: relative;
    overflow: hidden;
  }
  .enterprise::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 90% 20%, color-mix(in srgb, var(--purple) 50%, transparent), transparent 50%),
      radial-gradient(circle at 10% 80%, color-mix(in srgb, var(--lilac) 15%, transparent), transparent 55%);
    pointer-events: none;
  }
  .enterprise-inner {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
  }
  .enterprise h2 {
    font-family: var(--display);
    font-size: clamp(40px, 5vw, 64px);
    line-height: 0.95;
    letter-spacing: -0.015em;
    margin: 0 0 20px;
    color: #fff;
  }
  .enterprise p {
    font-size: 16px;
    color: rgba(255,255,255,0.72);
    margin: 0;
    max-width: 44ch;
  }
  .enterprise-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .ent-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 18px 20px;
    backdrop-filter: blur(8px);
  }
  .ent-pill h4 {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ent-pill h4 svg { color: var(--lilac); }
  .ent-pill p {
    font-size: 12.5px;
    color: rgba(255,255,255,0.6);
    line-height: 1.45;
    margin: 0;
  }

  /* Sisters */
  .sisters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .sister {
    background: var(--paper);
    border: 1px solid var(--gray-100);
    border-radius: 16px;
    padding: 28px;
    transition: all .3s var(--ease);
    display: block;
  }
  .sister:hover {
    border-color: var(--charcoal);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -20px rgba(20,10,50,0.2);
  }
  .sister-icon {
    width: 44px; height: 44px;
    background: var(--purple);
    color: #fff;
    border-radius: 11px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
  }
  .sister h4 {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--charcoal);
    letter-spacing: -0.005em;
  }
  .sister p {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0 0 20px;
    line-height: 1.5;
  }
  .sister-link {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal);
    display: inline-flex;
    gap: 8px;
    align-items: center;
    transition: color .2s var(--ease), gap .2s var(--ease);
  }
  .sister:hover .sister-link { color: var(--purple); gap: 12px; }

  /* CTA */
  .cta {
    background: var(--cosmic);
    color: #fff;
    border-radius: 28px;
    margin: 0 32px 80px;
    padding: 80px 64px;
    position: relative;
    overflow: hidden;
  }
  .cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 600px 400px at 20% 20%, color-mix(in srgb, var(--purple) 55%, transparent), transparent 60%),
      radial-gradient(ellipse 500px 300px at 90% 80%, color-mix(in srgb, var(--blush) 25%, transparent), transparent 55%);
    pointer-events: none;
  }
  .cta-inner {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
    align-items: end;
    max-width: var(--container);
    margin: 0 auto;
  }
  .cta h2 {
    font-family: var(--display);
    font-size: clamp(44px, 5.5vw, 80px);
    line-height: 0.88;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
    max-width: 14ch;
  }
  .cta h2 span { color: var(--lilac); }
  .cta-body {
    font-size: 16px;
    color: rgba(255,255,255,0.72);
    line-height: 1.55;
    margin: 0 0 28px;
  }
  .cta-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
  .btn-light { background: #fff; color: var(--charcoal); border: 1px solid #fff; }
  .btn-light:hover { background: var(--blush); border-color: var(--blush); transform: translateY(-1px); }
  .btn-outline-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
  }
  .btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

  @media (max-width: 1024px) {
    .hero-card { padding: 48px 40px; }
    .features { grid-template-columns: 1fr; }
    .doc-types { grid-template-columns: repeat(2, 1fr); }
    .io-coverage { grid-template-columns: 1fr; }
    .enterprise { padding: 56px 40px; margin: 0 16px; }
    .enterprise-inner { grid-template-columns: 1fr; gap: 40px; }
    .sisters { grid-template-columns: 1fr; }
    .cta { padding: 56px 40px; margin: 0 16px 48px; }
    .cta-inner { grid-template-columns: 1fr; }
    .section-head { grid-template-columns: 1fr; gap: 16px; }
    .widget-header { flex-direction: column; align-items: flex-start; }
    .split-view { grid-template-columns: 1fr; }
  }
  @media (max-width: 720px) {
    .container { padding: 0 20px; }
    .hero-card { padding: 36px 24px; border-radius: 20px; }
    section.sec { padding: 64px 0; }
    .widget-header { padding: 24px 20px 16px; }
    .stage { padding: 16px 20px 20px; }
    .dropzone-full { padding: 40px 20px; min-height: 300px; }
    .action-btn { margin: 4px 20px 20px; width: calc(100% - 40px); }
    .doc-types { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-brand { grid-column: 1 / -1; }
    .document { padding: 20px; }
    .output-content { padding: 20px; }
  }