/* ---------- Nexus Extract — module-specific hero visual ----------
   Generic mk-* layout lives in module.css. This file holds the
   "document → structured data" extraction mockup in the hero, plus
   a small confidence-badge helper reused in the page.
   ----------------------------------------------------------------- */

.mx-extract { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; }
.mx-extract__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mx-extract__bar .dot { width: 9px; height: 9px; border-radius: 999px; background: var(--border-strong); }
.mx-extract__bar .ttl { margin-left: 8px; font-size: 12.5px; font-weight: 600; color: var(--fg-subtle); font-family: var(--font-mono); }

.mx-extract__body { display: grid; grid-template-columns: 0.82fr 1fr; gap: 0; }
.mx-extract__body > * { padding: 18px; }
.mx-doc { border-right: 1px solid var(--border); background: var(--surface-2); }
@media (max-width: 520px){ .mx-extract__body { grid-template-columns: 1fr; } .mx-doc { border-right: none; border-bottom: 1px solid var(--border); } }

/* Document preview (a stylised invoice) */
.mx-paper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-1); }
.mx-paper__top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.mx-paper__title { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: var(--fg-strong); text-transform: uppercase; }
.mx-paper__tag { font-size: 10px; font-family: var(--font-mono); color: var(--fg-subtle); }
.mx-line { height: 7px; border-radius: 3px; background: var(--surface-inset); margin: 7px 0; }
.mx-line.w90 { width: 90%; } .mx-line.w70 { width: 70%; } .mx-line.w50 { width: 50%; } .mx-line.w40 { width: 40%; }
/* highlighted fields the model is pulling out */
.mx-hl { display: inline-flex; align-items: center; gap: 6px; margin: 6px 6px 6px 0; padding: 4px 8px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--nx-green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--nx-green) 38%, transparent);
  font-size: 11px; font-family: var(--font-mono); color: var(--fg-strong); }
.mx-hl .d { color: var(--fg-subtle); }
.mx-paper__rows { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }

/* Extracted structured fields */
.mx-fields__lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-subtle); margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.mx-fields__lbl .ci { color: var(--nx-green); display: grid; place-items: center; }
.mx-fields__lbl .ci svg { width: 14px; height: 14px; }
.mx-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.mx-field:last-of-type { border-bottom: none; }
.mx-field .k { font-size: 11px; color: var(--fg-subtle); }
.mx-field .v { grid-row: 2; font-size: 13.5px; font-weight: 700; color: var(--fg-strong); font-family: var(--font-mono); }

/* Confidence badge + mini bar */
.mx-conf { grid-row: 1 / span 2; justify-self: end; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; font-family: var(--font-mono); }
.mx-conf .bar { width: 38px; height: 5px; border-radius: 999px; background: var(--surface-inset); overflow: hidden; }
.mx-conf .bar i { display: block; height: 100%; border-radius: 999px; background: var(--nx-green); }
.mx-conf.is-mid { color: var(--warning); }
.mx-conf.is-mid .bar i { background: var(--warning); }
.mx-conf.is-high { color: var(--nx-green); }

.mx-extract__foot { display: flex; align-items: center; gap: 9px; padding: 13px 18px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; color: var(--fg-muted); }
.mx-extract__foot .ci { color: var(--nx-green); display: grid; place-items: center; }
.mx-extract__foot .ci svg { width: 16px; height: 16px; }
.mx-extract__foot .go { margin-left: auto; color: var(--fg-subtle); font-family: var(--font-mono); font-size: 11px; }
