:root {
  color-scheme: light;
  --ink: #171a21;
  --paper: #f5f2e9;
  --paper-bright: #fffdf8;
  --canvas: #e7e6e0;
  --line: rgba(23, 26, 33, .12);
  --muted: #777d87;
  --blue: #335cff;
  --coral: #ff6b3d;
  --mint: #84e4bd;
  --green: #249b6d;
  --yellow: #f4d35e;
  --dark: #151922;
  --dark-2: #1b2230;
  --sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 14px var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input { color: inherit; font: inherit; }
button { border: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.noise {
  position: fixed;
  z-index: 50;
  opacity: .035;
  pointer-events: none;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}
.demo-disclosure {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 20px;
  background: #0f131a;
  color: #cbd0d8;
  font: 8px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.demo-disclosure span:last-child { color: #656c78; text-transform: none; }
.disclosure-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: pulse 2s ease-in-out infinite;
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  min-height: 76px;
  align-items: center;
  gap: 24px;
  grid-template-columns: minmax(220px, 1fr) auto minmax(300px, 1fr);
  padding: 0 clamp(20px, 3vw, 50px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 241, .9);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; width: max-content; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-prism { position: relative; display: block; width: 38px; height: 38px; animation: prism-float 5s ease-in-out infinite; }
.brand-prism i {
  position: absolute;
  display: block;
  width: 23px;
  height: 23px;
  clip-path: polygon(50% 0, 100% 26%, 100% 76%, 50% 100%, 0 76%, 0 26%);
  left: 8px;
  top: 8px;
}
.brand-prism i:nth-child(1) { background: var(--blue); transform: translate(-4px, 2px); }
.brand-prism i:nth-child(2) { background: var(--coral); opacity: .88; transform: translate(4px, -2px); }
.brand-prism i:nth-child(3) { background: var(--mint); clip-path: polygon(50% 0, 100% 26%, 50% 50%, 0 26%); }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 18px; font-weight: 780; letter-spacing: -.055em; }
.brand-copy strong span { color: var(--blue); }
.brand-copy small { color: var(--muted); font: 7px var(--mono); letter-spacing: .12em; text-transform: uppercase; }

.view-switcher {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(23, 26, 33, .04);
}
.view-button {
  display: flex;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 670;
  transition: 180ms ease;
}
.view-button svg { width: 15px; height: 15px; }
.view-button:hover { color: var(--ink); }
.view-button.active { background: var(--dark); color: #fff; box-shadow: 0 9px 22px rgba(23, 26, 33, .16); }
.header-metrics { display: flex; align-items: center; justify-content: flex-end; gap: clamp(16px, 2vw, 28px); }
.header-metrics > div { display: grid; align-items: baseline; gap: 3px 7px; grid-template-columns: auto auto; }
.header-metrics strong { font: 13px var(--mono); }
.header-metrics span { max-width: 58px; color: var(--muted); font-size: 7px; line-height: 1.2; text-transform: uppercase; }
.header-metrics .api-status { padding: 8px 10px; border: 1px solid rgba(36,155,109,.16); border-radius: 10px; background: rgba(132,228,189,.12); }
.api-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(36,155,109,.42); }

.view { min-height: calc(100vh - 104px); }
.view[hidden] { display: none !important; }
.lab-layout { display: grid; min-height: calc(100vh - 104px); grid-template-columns: 270px minmax(540px, 1fr) 350px; }
.batch-sidebar, .results-panel { position: relative; z-index: 2; padding: 27px 20px; }
.batch-sidebar { border-right: 1px solid rgba(255,255,255,.08); background: var(--dark); color: #fff; }
.results-panel { border-left: 1px solid var(--line); background: rgba(255,253,248,.8); backdrop-filter: blur(16px); }
.eyebrow { display: block; color: var(--muted); font: 650 7px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }

.sidebar-heading { position: relative; margin-bottom: 18px; }
.sidebar-heading .eyebrow { color: #6d7480; }
.sidebar-heading h1 { margin: 6px 0 0; font-size: 22px; font-weight: 680; letter-spacing: -.045em; }
.sidebar-menu { position: absolute; width: 30px; height: 28px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: rgba(255,255,255,.04); color: #727987; cursor: pointer; right: 0; top: 4px; }
.batch-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.035); }
.batch-progress { position: relative; display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; }
.batch-progress svg { position: absolute; width: 46px; transform: rotate(-90deg); }
.batch-progress circle { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 3; }
.batch-progress .progress-ring { stroke: var(--coral); stroke-dasharray: 113; stroke-linecap: round; }
.batch-progress > span { display: flex; align-items: center; flex-direction: column; }
.batch-progress strong { font: 12px var(--mono); }
.batch-progress small { color: #69717d; font-size: 6px; }
.batch-summary > div:last-child strong, .batch-summary > div:last-child span { display: block; }
.batch-summary > div:last-child strong { margin-bottom: 4px; font-size: 10px; }
.batch-summary > div:last-child span { color: #737b87; font-size: 8px; }

.document-list { display: grid; gap: 8px; }
.document-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 76px;
  align-items: center;
  gap: 10px;
  grid-template-columns: 48px 1fr;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: 180ms ease;
}
.document-item:hover { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.05); }
.document-item.active { border-color: rgba(255,107,61,.4); background: linear-gradient(110deg, rgba(255,107,61,.13), rgba(255,255,255,.025)); }
.document-thumb { position: relative; display: flex; width: 43px; height: 56px; padding: 7px 6px; overflow: hidden; border-radius: 5px; flex-direction: column; gap: 4px; }
.document-thumb::after { position: absolute; border-style: solid; border-width: 0 9px 9px 0; content: ""; right: 0; top: 0; }
.document-thumb i { margin-bottom: 5px; color: #fff; font: 700 8px var(--mono); font-style: normal; }
.document-thumb b { display: block; width: 100%; height: 2px; border-radius: 3px; background: rgba(255,255,255,.58); }
.document-thumb b:last-child { width: 65%; }
.thumb-coral { background: #bd4c31; }.thumb-coral::after { border-color: transparent #f58f70 transparent transparent; }
.thumb-blue { background: #3457bd; }.thumb-blue::after { border-color: transparent #7592ee transparent transparent; }
.thumb-green { background: #267d63; }.thumb-green::after { border-color: transparent #67c5a4 transparent transparent; }
.document-meta { min-width: 0; }
.document-meta strong, .document-meta small, .document-status { display: block; }
.document-meta strong { margin-bottom: 4px; overflow: hidden; font-size: 9px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.document-meta small { margin-bottom: 7px; color: #686f7b; font-size: 7px; }
.document-status { color: #777e89; font: 6px var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.document-status i { display: inline-block; width: 4px; height: 4px; margin-right: 4px; border-radius: 50%; background: #5e6671; }
.document-status.done { color: #85cfae; }.document-status.done i { background: var(--mint); box-shadow: 0 0 7px var(--mint); }
.document-status.processing { color: #ff9b7e; }.document-status.processing i { background: var(--coral); box-shadow: 0 0 7px var(--coral); animation: pulse .9s infinite; }
.document-index { position: absolute; color: #4e5662; font: 6px var(--mono); right: 8px; top: 7px; }

.drop-zone { display: flex; min-height: 64px; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px dashed rgba(255,255,255,.14); border-radius: 12px; color: #fff; }
.drop-icon { display: grid; width: 32px; height: 32px; border: 1px solid rgba(132,228,189,.2); border-radius: 9px; background: rgba(132,228,189,.08); color: var(--mint); place-items: center; }
.drop-icon svg { width: 15px; }.drop-zone strong, .drop-zone small { display: block; }
.drop-zone strong { margin-bottom: 3px; font-size: 8px; }.drop-zone small { color: #67707c; font-size: 7px; }
.sidebar-stack { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-stack .eyebrow { margin-bottom: 8px; color: #5f6773; }
.sidebar-stack > div { display: grid; align-items: center; gap: 8px; grid-template-columns: 45px 1fr 6px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.045); }
.sidebar-stack span { color: #626a76; font: 6px var(--mono); text-transform: uppercase; }
.sidebar-stack strong { font-size: 8px; font-weight: 540; }
.online-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 7px rgba(132,228,189,.6); }
.architecture-link { display: flex; width: 100%; height: 42px; align-items: center; justify-content: space-between; margin-top: 20px; padding: 0 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: transparent; color: #78808b; cursor: pointer; font-size: 8px; }
.architecture-link svg { width: 13px; }.architecture-link:hover { color: #fff; }

.document-stage {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 30px clamp(24px, 3.3vw, 52px) 24px;
  overflow: hidden;
  background: radial-gradient(circle at 80% 5%, rgba(51,92,255,.06), transparent 24rem), var(--canvas);
}
.stage-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.stage-heading h2, .architecture-heading h2 { margin: 7px 0 0; font-size: clamp(28px, 3vw, 46px); font-weight: 690; letter-spacing: -.055em; line-height: .98; }
.stage-heading h2 em, .architecture-heading h2 em { color: var(--coral); font-style: normal; }
.stage-actions { display: flex; gap: 7px; }
.tool-button { display: flex; height: 35px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.52); color: var(--muted); cursor: pointer; font-size: 8px; font-weight: 620; }
.tool-button svg { width: 14px; }.tool-button:hover, .tool-button.active { background: var(--paper-bright); color: var(--blue); }
.document-toolbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 13px 13px 0 0; background: rgba(255,253,248,.8); }
.file-identity { display: flex; align-items: center; gap: 9px; }
.pdf-chip { display: grid; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,107,61,.12); color: var(--coral); font: 700 6px var(--mono); place-items: center; }
.file-identity strong, .file-identity small { display: block; }.file-identity strong { margin-bottom: 3px; font-size: 8px; }.file-identity small { color: var(--muted); font-size: 6px; }
.document-position { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 6px var(--mono); text-transform: uppercase; }
.document-position i { width: 2px; height: 2px; border-radius: 50%; background: #aaa; }.canvas-zoom { color: var(--muted); font: 7px var(--mono); }
.document-canvas { position: relative; display: grid; min-height: 480px; flex: 1; overflow: hidden; border: 1px solid var(--line); background: #d8d8d3; place-items: center; perspective: 1100px; }
.canvas-grid { position: absolute; inset: 0; opacity: .55; background-image: linear-gradient(rgba(23,26,33,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(23,26,33,.035) 1px, transparent 1px); background-size: 26px 26px; }
.invoice-page {
  position: relative;
  width: min(390px, 70%);
  aspect-ratio: .76;
  padding: 32px 29px 25px;
  overflow: hidden;
  background: var(--paper-bright);
  box-shadow: 0 25px 60px rgba(35,36,39,.22);
  transform: rotateX(1.5deg) rotateZ(-.55deg);
  transition: 260ms ease;
}
.invoice-page.zoomed { width: min(490px, 86%); transform: none; }
.page-fold { position: absolute; width: 38px; height: 38px; background: linear-gradient(225deg, #d9d8d2 0 50%, #f8f5ed 51%); clip-path: polygon(0 0, 100% 100%, 0 100%); right: 0; top: 0; }
.invoice-brand-block { display: flex; align-items: center; gap: 10px; }
.invoice-monogram { display: grid; width: 37px; height: 37px; background: var(--invoice-color, var(--coral)); color: #fff; font: 700 11px var(--mono); place-items: center; }
.invoice-brand-block strong, .invoice-brand-block span { display: block; }.invoice-brand-block strong { margin-bottom: 3px; font-size: 8px; letter-spacing: .08em; }.invoice-brand-block span { color: #92938f; font-size: 5px; }
.invoice-title-block { position: absolute; text-align: right; right: 29px; top: 36px; }
.invoice-title-block span, .invoice-title-block strong { display: block; }.invoice-title-block span { margin-bottom: 4px; color: var(--invoice-color, var(--coral)); font-size: 12px; font-weight: 800; letter-spacing: .14em; }.invoice-title-block strong { font: 6px var(--mono); }
.invoice-rule { height: 3px; margin: 20px 0 18px; background: var(--invoice-color, var(--coral)); }
.address-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.address-grid > div:first-child small, .address-grid > div:first-child strong, .address-grid > div:first-child span { display: block; }
.address-grid > div:first-child small { margin-bottom: 7px; color: var(--invoice-color, var(--coral)); font-size: 5px; font-weight: 700; }.address-grid > div:first-child strong { margin-bottom: 5px; font-size: 7px; }.address-grid > div:first-child span { margin-top: 3px; color: #7d7f7b; font-size: 5px; }
.address-grid dl, .totals-block dl { display: grid; grid-template-columns: 1fr auto; margin: 0 0 5px; font-size: 5px; }.address-grid dt, .totals-block dt { color: #8c8e89; }.address-grid dd, .totals-block dd { margin: 0; font-family: var(--mono); }
.line-items { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: 5px; }
.line-items th { padding: 7px 5px; border-bottom: 1px solid var(--invoice-color, var(--coral)); background: rgba(23,26,33,.035); color: #6f716d; font-size: 4px; text-align: right; text-transform: uppercase; }
.line-items th:first-child, .line-items td:first-child { text-align: left; }.line-items td { padding: 8px 5px; border-bottom: 1px solid #eceae3; text-align: right; }
.totals-block { width: 45%; margin: 18px 0 0 auto; }.totals-block dl { padding: 0 4px; }
.totals-block .grand-total { margin-top: 7px; padding: 7px 5px; border-top: 1px solid var(--invoice-color, var(--coral)); font-size: 7px; font-weight: 700; }
.invoice-footer { position: absolute; display: flex; align-items: flex-end; justify-content: space-between; border-top: 1px solid #e3e1da; bottom: 24px; left: 29px; padding-top: 9px; right: 29px; }
.invoice-footer > span { color: #999b96; font-size: 5px; }.signature { color: var(--invoice-color, var(--coral)); font: italic 12px cursive; transform: rotate(-6deg); }

.ocr-box { position: absolute; border: 1px solid var(--blue); background: rgba(51,92,255,.045); color: var(--blue); cursor: pointer; transition: 180ms ease; }
.ocr-box::before, .ocr-box::after { position: absolute; width: 4px; height: 4px; background: currentColor; content: ""; }
.ocr-box::before { left: -2px; top: -2px; }.ocr-box::after { bottom: -2px; right: -2px; }
.ocr-box span { position: absolute; padding: 3px 4px; background: var(--blue); color: #fff; font: 4px var(--mono); left: -1px; top: -12px; white-space: nowrap; }
.ocr-box.corrected { border-color: var(--coral); background: rgba(255,107,61,.05); color: var(--coral); }.ocr-box.corrected span { background: var(--coral); }
.vendor-box { width: 135px; height: 40px; left: 25px; top: 24px; }.number-box { width: 93px; height: 35px; right: 24px; top: 32px; }.date-box { width: 76px; height: 15px; right: 28px; top: 107px; }.total-box { width: 74px; height: 22px; right: 27px; top: 337px; }
.boxes-hidden .ocr-box, .invoice-page.scanning .ocr-box { opacity: 0; pointer-events: none; }
.scan-line { position: absolute; height: 2px; background: linear-gradient(90deg, transparent, var(--blue) 15% 85%, transparent); box-shadow: 0 0 12px var(--blue); left: 0; opacity: 0; right: 0; top: 0; }
.invoice-page.scanning .scan-line { opacity: 1; animation: document-scan 1.5s ease-in-out infinite; }
.canvas-corner { position: absolute; color: rgba(23,26,33,.3); font: 6px var(--mono); }.corner-one { left: 12px; top: 12px; }.corner-two { bottom: 12px; right: 12px; }
.canvas-legend { position: absolute; display: flex; gap: 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(245,242,233,.8); bottom: 10px; color: var(--muted); font: 5px var(--mono); left: 10px; text-transform: uppercase; }
.canvas-legend span { display: flex; align-items: center; gap: 4px; }.canvas-legend i { width: 5px; height: 5px; }.legend-blue { background: var(--blue); }.legend-coral { background: var(--coral); }

.pipeline-strip { display: flex; min-height: 62px; align-items: center; justify-content: center; padding: 10px 12px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 13px 13px; background: rgba(255,253,248,.82); }
.pipeline-step { display: grid; align-items: center; gap: 7px; grid-template-columns: 22px 1fr auto; opacity: .32; transition: 180ms ease; }
.pipeline-step > span { display: grid; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font: 6px var(--mono); place-items: center; }
.pipeline-step strong, .pipeline-step small { display: block; white-space: nowrap; }.pipeline-step strong { margin-bottom: 3px; font-size: 7px; }.pipeline-step small { color: var(--muted); font-size: 5px; }.pipeline-step > i { width: 5px; height: 5px; border-radius: 50%; background: #aaa; }
.pipeline-strip > b { width: clamp(8px, 1.5vw, 28px); height: 1px; margin: 0 8px; background: var(--line); }
.pipeline-step.active, .pipeline-step.complete { opacity: 1; }
.pipeline-step.active > span { border-color: var(--blue); background: var(--blue); color: #fff; }.pipeline-step.active > i { background: var(--blue); box-shadow: 0 0 8px var(--blue); animation: pulse .8s infinite; }
.pipeline-step.complete > span { border-color: rgba(36,155,109,.2); background: rgba(132,228,189,.13); color: var(--green); }.pipeline-step.complete > i { background: var(--green); }

.results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.results-heading strong { display: block; margin-top: 6px; font-size: 16px; }.request-id { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font: 6px var(--mono); }
.result-status { display: grid; align-items: center; gap: 12px; grid-template-columns: 74px 1fr; margin-bottom: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.55); }
.confidence-orb { position: relative; display: grid; width: 68px; height: 68px; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--confidence) * 1turn), rgba(23,26,33,.075) 0); place-items: center; transform: rotate(-90deg); }
.confidence-orb::after { position: absolute; border-radius: 50%; background: var(--paper-bright); content: ""; inset: 5px; }
.confidence-orb > span { position: relative; z-index: 1; display: flex; align-items: center; flex-direction: column; transform: rotate(90deg); }
.confidence-orb strong { font: 13px var(--mono); }.confidence-orb small { color: var(--muted); font-size: 5px; text-transform: uppercase; }
.success-label { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; color: var(--green); font: 6px var(--mono); text-transform: uppercase; }
.success-label i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 7px var(--green); }
.result-status > div:last-child > strong, .result-status > div:last-child > small { display: block; }.result-status > div:last-child > strong { margin-bottom: 4px; font-size: 11px; }.result-status > div:last-child > small { color: var(--muted); font-size: 7px; }
.result-tabs { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(23,26,33,.035); }
.result-tab { height: 30px; flex: 1; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font: 6px var(--mono); text-transform: uppercase; }
.result-tab.active { background: var(--paper-bright); color: var(--ink); box-shadow: 0 5px 12px rgba(23,26,33,.06); }
.result-pane { display: none; min-height: 290px; padding-top: 13px; }.result-pane.active { display: block; animation: pane-in .22s ease both; }
.fields-header { display: grid; grid-template-columns: 110px 1fr; padding: 0 8px 7px; color: var(--muted); font: 5px var(--mono); text-transform: uppercase; }
.field-list { display: grid; gap: 6px; }
.field-row { display: grid; min-height: 51px; align-items: center; gap: 8px; grid-template-columns: 104px 1fr auto; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.48); animation: field-in .34s ease both; }
.field-row > span:first-child { color: var(--muted); font: 6px var(--mono); }
.field-value { min-width: 0; }.field-value strong, .field-value small { display: block; }.field-value strong { margin-bottom: 3px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.field-value small { color: var(--muted); font: 5px var(--mono); }.field-value small del { color: #b17a69; }
.field-confidence { display: flex; align-items: center; gap: 5px; color: var(--green); font: 6px var(--mono); }.field-confidence i { width: 4px; height: 4px; border-radius: 50%; background: var(--mint); }.field-confidence.corrected { color: var(--coral); }.field-confidence.corrected i { background: var(--coral); }
.correction-summary { display: grid; align-items: center; gap: 10px; grid-template-columns: 34px 1fr; margin-top: 9px; padding: 10px; border: 1px solid rgba(255,107,61,.17); border-radius: 10px; background: rgba(255,107,61,.1); }
.correction-mark { position: relative; display: grid; width: 31px; height: 31px; border-radius: 8px; background: var(--coral); place-items: center; }.correction-mark span { position: absolute; width: 15px; height: 2px; border-radius: 3px; background: #fff; }.correction-mark span:first-child { transform: translateY(-5px); }.correction-mark span:last-child { transform: translateY(5px); }
.correction-summary strong, .correction-summary small { display: block; }.correction-summary strong { margin-bottom: 3px; font-size: 8px; }.correction-summary small { color: #a36a58; font-size: 6px; }
.code-toolbar { display: flex; height: 34px; align-items: center; justify-content: space-between; padding: 0 9px; border-radius: 9px 9px 0 0; background: #1e2430; color: #aeb5c0; font: 6px var(--mono); }
.code-toolbar span { display: flex; align-items: center; gap: 6px; }.code-toolbar i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }.code-toolbar button { padding: 4px 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 5px; background: rgba(255,255,255,.05); color: #bfc5ce; cursor: pointer; font-size: 6px; }
#json-output { min-height: 250px; max-height: 300px; margin: 0; overflow: auto; padding: 14px; border-radius: 0 0 9px 9px; background: var(--dark); color: #c6d2df; font: 7px/1.7 var(--mono); white-space: pre-wrap; }
.trace-list { display: grid; gap: 7px; }.trace-item { display: grid; align-items: center; gap: 8px; grid-template-columns: 27px 1fr auto; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.45); }
.trace-item > span { display: grid; width: 25px; height: 25px; border-radius: 7px; background: rgba(51,92,255,.1); color: var(--blue); font: 6px var(--mono); place-items: center; }
.trace-item strong, .trace-item small { display: block; }.trace-item strong { margin-bottom: 3px; font-size: 8px; }.trace-item small { color: var(--muted); font-size: 6px; }.trace-item > time { color: var(--muted); font: 6px var(--mono); }
.api-callout { margin-top: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(51,92,255,.055); }
.api-callout > div { display: flex; align-items: center; gap: 7px; }.method-chip { display: inline-flex; height: 20px; align-items: center; padding: 0 6px; border-radius: 5px; background: var(--mint); color: #145f45; font: 700 6px var(--mono); }
.api-callout code, .dialog-header code { font: 7px var(--mono); }.api-callout p { margin: 8px 0 10px; color: var(--muted); font-size: 7px; }
.api-callout button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 7px; font-weight: 650; }.api-callout button svg { width: 12px; }
.run-extraction { display: grid; width: 100%; min-height: 54px; align-items: center; gap: 9px; grid-template-columns: 35px 1fr 18px; margin-top: 11px; padding: 8px 10px; border-radius: 12px; background: var(--blue); color: #fff; cursor: pointer; text-align: left; box-shadow: 0 13px 28px rgba(51,92,255,.18); }
.run-extraction:disabled { opacity: .6; cursor: wait; }.run-icon { display: grid; width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.13); place-items: center; }.run-icon svg { width: 17px; }
.run-extraction strong, .run-extraction small { display: block; }.run-extraction strong { margin-bottom: 3px; font-size: 8px; }.run-extraction small { color: rgba(255,255,255,.63); font-size: 6px; }.run-arrow { width: 15px; }

.api-dialog { width: min(600px, calc(100% - 32px)); padding: 0; border: 1px solid rgba(255,255,255,.11); border-radius: 17px; background: var(--dark); color: #fff; box-shadow: 0 30px 100px rgba(0,0,0,.45); }
.api-dialog::backdrop { background: rgba(16,18,24,.64); backdrop-filter: blur(8px); }
.dialog-header { display: flex; min-height: 56px; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid rgba(255,255,255,.08); }
.dialog-header > div { display: flex; align-items: center; gap: 9px; }.dialog-header button { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.05); color: #89919d; cursor: pointer; font-size: 18px; }
.dialog-body { padding: 20px; }.dialog-body .eyebrow { color: #68717f; }.dialog-body pre { margin: 9px 0 21px; padding: 15px; overflow: auto; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.035); color: #c8d2de; font: 8px/1.6 var(--mono); }
.schema-grid { display: grid; gap: 7px; grid-template-columns: 1fr 1fr; margin-top: 9px; }.schema-grid div { display: flex; align-items: center; justify-content: space-between; padding: 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; }.schema-grid code { color: var(--mint); font: 7px var(--mono); }.schema-grid span { color: #68717f; font: 6px var(--mono); }

.architecture-view { padding: 34px clamp(18px, 4vw, 64px) 44px; background: radial-gradient(circle at 18% 0%, rgba(255,107,61,.08), transparent 28rem), radial-gradient(circle at 90% 30%, rgba(51,92,255,.07), transparent 32rem), var(--paper); }
.architecture-shell { width: min(100%, 1580px); margin: 0 auto; }
.architecture-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 25px; }.architecture-heading h2 { max-width: 720px; font-size: clamp(31px, 3.4vw, 54px); }
.architecture-summary { display: flex; align-items: center; gap: 13px; }.architecture-summary > div { display: flex; flex-direction: column; gap: 4px; }.architecture-summary span { color: var(--muted); font: 6px var(--mono); text-transform: uppercase; }.architecture-summary strong { font-size: 8px; white-space: nowrap; }.architecture-summary > i { width: 20px; height: 1px; background: var(--line); }
.graph-console { overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: var(--dark); color: #fff; box-shadow: 0 32px 100px rgba(23,26,33,.28); }
.graph-toolbar { position: relative; z-index: 5; display: grid; min-height: 60px; align-items: center; gap: 20px; grid-template-columns: 1fr auto 1fr; padding: 8px 14px 8px 19px; border-bottom: 1px solid rgba(255,255,255,.08); background: #131823; }
.graph-identity { display: flex; align-items: center; gap: 9px; }.graph-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 12px var(--coral); }
.graph-identity strong, .graph-identity small { display: block; font-family: var(--mono); }.graph-identity strong { margin-bottom: 3px; font-size: 8px; text-transform: uppercase; }.graph-identity small { color: #646d7c; font-size: 6px; }
.graph-modes { display: flex; gap: 3px; padding: 3px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.025); }
.graph-mode { height: 29px; padding: 0 11px; border-radius: 6px; background: transparent; color: #69717e; cursor: pointer; font: 6px var(--mono); text-transform: uppercase; }.graph-mode.active { background: rgba(255,255,255,.08); color: #fff; }
.graph-controls { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.run-flow, .graph-icon-button, .graph-fit-button { display: flex; height: 32px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: rgba(255,255,255,.035); color: #8d95a1; cursor: pointer; font: 6px var(--mono); }
.run-flow { gap: 7px; padding: 0 12px; border-color: var(--coral); background: var(--coral); color: #fff; font-weight: 700; text-transform: uppercase; }.run-flow svg { width: 11px; }.run-flow:disabled { opacity: .6; }
.graph-controls > span { width: 1px; height: 17px; background: rgba(255,255,255,.08); }.graph-icon-button { width: 32px; font-size: 13px; }.graph-fit-button { padding: 0 10px; }.graph-controls small { width: 34px; color: #666f7d; font: 6px var(--mono); text-align: center; }
.graph-viewport { position: relative; height: min(68vh, 710px); min-height: 550px; overflow: hidden; background: radial-gradient(circle, rgba(51,92,255,.07), transparent 45%), #101620; cursor: grab; touch-action: none; }.graph-viewport.dragging { cursor: grabbing; }
.blueprint-grid { position: absolute; opacity: .65; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px), radial-gradient(rgba(51,92,255,.17) .7px, transparent .7px); background-size: 88px 88px, 88px 88px, 22px 22px; }
.graph-camera { position: absolute; width: 1600px; height: 730px; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.graph-lines { position: absolute; overflow: visible; inset: 0; }.line-group, .node-group { display: none; }.line-group.active, .node-group.active { display: block; }
.flow-line { fill: none; stroke-dasharray: 5 8; stroke-linecap: round; stroke-width: 1.45; animation: line-flow 1.8s linear infinite; vector-effect: non-scaling-stroke; }
.runtime-line { marker-end: url("#runtimeArrow"); stroke: rgba(51,92,255,.65); }.config-line { marker-end: url("#runtimeArrow"); stroke: rgba(244,211,94,.55); }.audit-line { marker-end: url("#runtimeArrow"); stroke: rgba(132,228,189,.55); }
.quality-line, .loop-line, .release-line { marker-end: url("#qualityArrow"); stroke: rgba(255,107,61,.62); }.loop-line { stroke-dasharray: 2 9; }
#runtimeArrow path { fill: var(--blue); stroke: none; }#qualityArrow path { fill: var(--coral); stroke: none; }
.graph-node {
  position: absolute;
  display: flex;
  width: 175px;
  min-height: 120px;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), transparent 52%), rgba(25,32,44,.95);
  color: #fff;
  cursor: pointer;
  flex-direction: column;
  left: var(--x);
  top: var(--y);
  text-align: left;
  box-shadow: 0 17px 38px rgba(0,0,0,.28);
  transition: 170ms ease;
}
.graph-node::before { position: absolute; height: 3px; border-radius: 3px 3px 0 0; background: var(--node-color, var(--blue)); content: ""; left: 9px; right: 9px; top: -1px; box-shadow: 0 0 13px color-mix(in srgb, var(--node-color, var(--blue)) 45%, transparent); }
.graph-node::after { position: absolute; border: 1px solid color-mix(in srgb, var(--node-color, var(--blue)) 20%, transparent); border-radius: inherit; content: ""; inset: 5px; opacity: 0; pointer-events: none; }
.graph-node:hover, .graph-node.selected, .graph-node.flow-active { border-color: color-mix(in srgb, var(--node-color, var(--blue)) 55%, transparent); box-shadow: 0 20px 48px rgba(0,0,0,.35), 0 0 28px color-mix(in srgb, var(--node-color, var(--blue)) 11%, transparent); transform: translateY(-3px); }
.graph-node:hover::after, .graph-node.selected::after, .graph-node.flow-active::after { opacity: 1; }.graph-node.flow-active { animation: node-active .62s ease both; }
.graph-node small { margin-bottom: 12px; color: var(--node-color, var(--blue)); font: 7px var(--mono); text-transform: uppercase; }.graph-node strong { margin-bottom: 7px; font-size: 13px; }.graph-node > span:not(.port) { color: #747e8d; font: 7px var(--mono); }
.port { position: absolute; z-index: 2; width: 8px; height: 8px; border: 1px solid var(--node-color, var(--blue)); border-radius: 50%; background: #111722; }.port-left { left: -5px; top: calc(50% - 4px); }.port-right { right: -5px; top: calc(50% - 4px); }.port-top { left: calc(50% - 4px); top: -5px; }.port-bottom { bottom: -5px; left: calc(50% - 4px); }
.node-document,.node-corpus { --node-color: var(--coral); }.node-api,.node-audit,.node-evaluate { --node-color: var(--mint); }.node-ocr { --node-color: var(--blue); }.node-extract,.node-baseline { --node-color: #9e86ff; }.node-config { --node-color: var(--yellow); }.node-regex,.node-errors { --node-color: var(--coral); }.node-json,.node-release { --node-color: #fff; }.node-review,.node-loop { --node-color: #7d8b9f; }
.zone-label { position: absolute; padding: 5px 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 5px; background: rgba(16,22,32,.86); color: #5d6877; font: 6px var(--mono); left: var(--x); text-transform: uppercase; top: var(--y); }.trust-zone { color: #7084ca; }.quality-zone,.loop-zone { color: #b76b53; }
.node-inspector { position: absolute; z-index: 4; width: min(340px, calc(100% - 30px)); min-height: 116px; padding: 16px 17px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(17,23,34,.9); bottom: 16px; box-shadow: 0 18px 55px rgba(0,0,0,.3); left: 16px; pointer-events: none; backdrop-filter: blur(14px); }
.node-inspector span { display: block; margin-bottom: 6px; color: var(--coral); font: 7px var(--mono); text-transform: uppercase; }.node-inspector strong { display: block; margin-bottom: 7px; font-size: 13px; }.node-inspector p { margin: 0; color: #86909e; font-size: 9px; line-height: 1.5; }
.graph-hint { position: absolute; display: flex; align-items: center; gap: 7px; color: #56606e; font: 6px var(--mono); bottom: 13px; right: 16px; text-transform: uppercase; }.graph-hint i { width: 2px; height: 2px; border-radius: 50%; background: #5d6877; }
.graph-footer { display: grid; min-height: 48px; align-items: center; gap: 15px; grid-template-columns: 1fr auto 1fr; padding: 8px 17px; border-top: 1px solid rgba(255,255,255,.08); background: #131823; color: #5f6875; font: 6px var(--mono); text-transform: uppercase; }
.graph-legend { display: flex; gap: 14px; }.graph-legend span { display: flex; align-items: center; gap: 5px; }.graph-legend i { width: 4px; height: 4px; border-radius: 50%; }.runtime-dot { background: var(--blue); }.config-dot { background: var(--yellow); }.quality-dot { background: var(--coral); }.graph-footer > div:nth-child(2) { text-align: center; }.graph-footer > span { text-align: right; }

@keyframes pulse { 50% { opacity: .45; } }
@keyframes prism-float { 50% { transform: translateY(-2px) rotate(3deg); } }
@keyframes pane-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes field-in { from { opacity: 0; transform: translateX(8px); } }
@keyframes document-scan { 0%,100% { transform: translateY(10px); } 50% { transform: translateY(470px); } }
@keyframes line-flow { to { stroke-dashoffset: -26; } }
@keyframes node-active { 45% { transform: scale(1.035) translateY(-3px); } }

@media (max-width: 1260px) {
  .lab-layout { grid-template-columns: 235px minmax(480px,1fr) 320px; }
  .batch-sidebar,.results-panel { padding-inline: 15px; }
  .document-stage { padding-inline: 26px; }
  .invoice-page { width: min(360px,75%); }
  .pipeline-step small { display: none; }
}
@media (max-width: 1040px) {
  .topbar { grid-template-columns: 1fr auto; }
  .view-switcher { grid-column: 1/-1; grid-row: 2; justify-self: center; margin-bottom: 9px; }
  .lab-layout { grid-template-columns: 220px minmax(0,1fr); }
  .results-panel { grid-column: 1/-1; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .demo-disclosure span:last-child,.header-metrics { display: none; }
  .topbar { min-height: 66px; padding: 0 14px; }
  .view-switcher { width: 100%; }.view-button { flex: 1; justify-content: center; }
  .lab-layout { display: block; }
  .batch-sidebar { display: flex; padding: 11px; overflow-x: auto; border-right: 0; }
  .sidebar-heading,.batch-summary,.drop-zone,.sidebar-stack,.architecture-link { display: none; }
  .document-list { display: flex; gap: 8px; }.document-item { min-width: 205px; }
  .document-stage { min-height: 720px; padding: 27px 12px 18px; }
  .stage-heading,.architecture-heading { align-items: flex-start; flex-direction: column; }
  .stage-heading h2 { font-size: 34px; }.stage-actions { width: 100%; }.tool-button { flex: 1; justify-content: center; }
  .document-position { display: none; }.document-canvas { min-height: 500px; }.invoice-page { width: min(370px,87%); }
  .pipeline-strip { justify-content: space-between; padding-inline: 7px; }.pipeline-step { display: flex; flex-direction: column; gap: 3px; text-align: center; }.pipeline-step > i,.pipeline-step small,.pipeline-strip > b { display: none; }.pipeline-step > span { margin: auto; }
  .results-panel { padding: 21px 14px; }.result-pane { min-height: auto; }
  .architecture-view { padding: 27px 12px; }.architecture-heading h2 { font-size: 36px; }.architecture-summary { width: 100%; justify-content: space-between; }
  .graph-toolbar { display: flex; align-items: stretch; flex-wrap: wrap; padding: 10px; }.graph-identity { width: 100%; }.graph-modes { flex: 1; }.graph-mode { flex: 1; }
  .graph-controls > span,.graph-controls > small { display: none; }.graph-viewport { height: 590px; min-height: 590px; }.node-inspector { bottom: 42px; }.graph-hint { left: 16px; right: auto; }
  .graph-footer { grid-template-columns: 1fr; }.graph-footer > div:nth-child(2) { text-align: left; }.graph-footer > span { display: none; }
}
@media (max-width: 480px) {
  .brand-copy small { display: none; }.stage-heading h2 { font-size: 31px; }.document-canvas { min-height: 450px; }.invoice-page { padding: 26px 21px 21px; }.canvas-legend { display: none; }
  .architecture-summary span,.architecture-summary > i { display: none; }.graph-controls .graph-icon-button,.graph-controls .graph-fit-button { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
