/* Preprocessing workspace; the shared header artwork and alignment stay intact. */
body[data-section=preprocessing]{--process-edge:color-mix(in srgb,var(--accent) 45%,transparent);--process-ink:#bec8d7;--process-date:#48bdff;--process-amount:#91e678;--process-currency:#ffd05a;--process-person:#c7a2ff}
html[data-theme=human] body[data-section=preprocessing]{--process-ink:#c5c1b8}
.preprocessing-page .pipeline-map{gap:26px;margin:0 0 26px;grid-template-columns:repeat(5,minmax(0,1fr))}
.preprocessing-page .stage-tile{display:flex;flex-direction:row;justify-content:center;gap:14px;min-height:88px;padding:18px 14px;border:1px solid var(--process-edge);background:linear-gradient(145deg,var(--halo),transparent 70%);border-radius:10px}
.preprocessing-page .stage-tile:first-child{box-shadow:inset 0 0 16px var(--halo),0 0 18px var(--halo);border-color:var(--accent)}
.preprocessing-page .stage-tile .ui-icon{width:32px;height:32px;flex-shrink:0;color:var(--accent)}
.preprocessing-page .stage-tile h2{font-size:13px;line-height:1.5;text-align:left;letter-spacing:-.02em}
.preprocessing-page .stage-tile:not(:last-child):after{right:-22px;font-size:20px;color:var(--accent)}
.preprocessing-page .preprocess-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:stretch}
.preprocessing-page .preprocess-input,.preprocessing-page .live-result{padding:26px;border:1px solid var(--process-edge);border-radius:14px;background:linear-gradient(145deg,var(--halo),transparent 65%),var(--panel)}
.preprocessing-page .panel-title{gap:12px;min-height:38px;margin-bottom:20px}
.preprocessing-page .panel-title label,.preprocessing-page .panel-title h2{display:flex;align-items:center;gap:14px;font-size:21px;line-height:1.4;font-weight:700;letter-spacing:-.035em}
.preprocessing-page .panel-title .ui-icon{width:30px;height:30px;color:var(--accent)}
.preprocessing-page .live-result .panel-title .badge{font-size:9px;max-width:120px;text-align:center}
.preprocessing-page .preprocess-input textarea{height:240px;min-height:240px;padding:18px;font-size:16px;line-height:1.8;border:1px solid var(--process-edge);border-radius:9px;background:#0003}
.preprocessing-page .example-choices{margin-top:14px;gap:8px;font-size:12px}
.preprocessing-page .example-choices button{padding:8px 12px;min-height:40px}
.preprocessing-page .preprocess-input .primary-button{margin-top:22px;min-height:58px;font-size:16px;padding:16px 22px;font-weight:700;box-shadow:0 0 22px var(--halo)}
.preprocessing-page .preprocess-input .primary-button>span{font-size:24px}
.preprocessing-page .preprocess-input>.fine-print{font-size:11px;margin-top:16px;color:var(--process-ink)}
.preprocessing-page .highlighted-text{font-size:16px;min-height:68px;padding:14px 16px;line-height:2.1;border-color:var(--process-edge);background:#0003}
.preprocessing-page .entity-mark{--entity-color:var(--accent);color:var(--entity-color);background:color-mix(in srgb,var(--entity-color) 11%,transparent);border-color:color-mix(in srgb,var(--entity-color) 46%,transparent);padding:3px 7px;border-radius:5px;margin:0 2px;font-weight:600}
.preprocessing-page [data-entity-type=DATE]{--entity-color:var(--process-date)}
.preprocessing-page [data-entity-type=AMOUNT]{--entity-color:var(--process-amount)}
.preprocessing-page [data-entity-type=CURRENCY]{--entity-color:var(--process-currency)}
.preprocessing-page [data-entity-type=PER],.preprocessing-page [data-entity-type=ORG],.preprocessing-page [data-entity-type=LOC]{--entity-color:var(--process-person)}
.preprocessing-page .entity-mark:hover,.preprocessing-page .entity-mark[aria-expanded=true]{background:color-mix(in srgb,var(--entity-color) 22%,transparent)}
.entity-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin:10px 0 20px;min-height:20px}
.entity-legend>span{--entity-color:var(--accent);display:flex;align-items:center;gap:6px;font-size:10px;color:var(--process-ink)}
.entity-legend i{display:block;width:8px;height:8px;border-radius:50%;background:var(--entity-color);flex-shrink:0}
.extracted-heading{font-size:13px;margin:0 0 12px;font-weight:600}
.extracted-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.extracted-value{--entity-color:var(--accent);display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--process-edge);border-radius:8px;min-width:0;background:#0002}
.value-symbol{font-size:21px;color:var(--entity-color);line-height:1;flex-shrink:0}
.extracted-value>div{min-width:0}
.extracted-value small{display:block;font-size:10px;color:var(--process-ink);margin-bottom:3px}
.extracted-value strong{display:block;font-size:15px;color:var(--entity-color);line-height:1.5;overflow-wrap:anywhere;font-weight:600}
.extracted-values>.empty-state{grid-column:1/-1;font-size:12px;padding:4px 0}
.preprocess-intent{display:flex;align-items:center;gap:18px;padding:16px 0;margin:0 0 16px;border-top:1px solid var(--process-edge);border-bottom:1px solid var(--process-edge);font-size:13px}
.preprocess-intent>strong{color:var(--light);font-weight:600;border:1px solid var(--process-edge);padding:5px 10px;border-radius:6px;overflow-wrap:anywhere;background:var(--halo)}
.preprocessing-page .tone-card{padding:0;margin:0;border:0}
.preprocessing-page .tone-card h3{display:inline;font-size:13px;margin:0 14px 0 0;font-weight:600}
.preprocessing-page .tone-result{display:inline;font-size:14px;font-weight:600;color:var(--light)}
.preprocessing-page .tone-probabilities{margin-top:18px}
.preprocessing-page .tone-row{grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr) 46px;font-size:12px;gap:12px;margin:12px 0;color:var(--process-ink)}
.preprocessing-page .tone-track{height:8px;border-radius:6px;background:#ffffff0c;overflow:hidden}
.preprocessing-page .tone-track i{height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),var(--light))}
.preprocessing-page .tone-card .fine-print{font-size:10px;margin-top:16px;color:var(--process-ink)}
.preprocessing-page .processing-section-heading{margin:30px 0 20px}
.processing-section-heading:after{content:'';flex:1;height:1px;background:var(--process-edge);margin:20px 0 0 12px}
.preprocessing-page .processing-section-heading h2{font-size:25px;font-weight:700}
.preprocessing-page .pipeline{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.preprocessing-page .pipeline-step{padding:22px;border:1px solid var(--process-edge);border-radius:12px;max-height:none;min-width:0;background:linear-gradient(145deg,var(--halo),transparent 70%),var(--panel)}
.processing-step-heading{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.processing-step-heading .ui-icon{width:28px;height:28px;flex-shrink:0;color:var(--accent)}
.processing-step-heading .step-number{font-size:11px;line-height:1;border:1px solid var(--process-edge);border-radius:5px;padding:5px;color:var(--muted)}
.preprocessing-page .processing-step-heading h2{font-size:16px;line-height:1.5;color:var(--text);margin:0;font-weight:700}
.processing-step-description{color:var(--process-ink);font-size:12px;margin-bottom:14px;line-height:1.7;min-height:40px}
.preprocessing-page .step-result{font-size:13px;line-height:1.8;padding:14px;border:1px solid var(--process-edge);border-radius:8px;background:#0002;white-space:normal;overflow-wrap:anywhere;color:var(--text)}
.preprocessing-page [data-step=tokens] .step-result{padding:0;border:0;background:none;display:flex;flex-wrap:wrap;gap:6px}
.preprocessing-page .token{margin:0;padding:6px 10px;font-size:12px;border:1px solid var(--process-edge);border-radius:6px;background:#0002;color:var(--text)}
.processing-value-row{--entity-color:var(--light);display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:7px 0;border-bottom:1px solid #ffffff0b;font-size:12px;min-width:0}
.processing-value-row:last-child{border:0}
.processing-value-row>span{color:var(--process-ink);flex-shrink:0}
.processing-value-row>strong{color:var(--entity-color);font-weight:600;text-align:right;overflow-wrap:anywhere;min-width:0}
.processing-method{font-size:11px;color:var(--process-ink);margin-top:10px}
.processing-raw-intent{font-family:ui-monospace,Consolas,monospace;font-size:13px;overflow-wrap:anywhere}
.preprocessing-page .section-note{font-size:10px;color:var(--process-ink)}
@media(max-width:1100px){.preprocessing-page .stage-tile{flex-direction:column;gap:10px;padding:16px 10px}.preprocessing-page .stage-tile h2{text-align:center;font-size:12px}.preprocessing-page .preprocess-workspace{grid-template-columns:1fr}.preprocessing-page .preprocess-input textarea{height:180px;min-height:180px}.preprocessing-page .pipeline{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.preprocessing-page .pipeline-map{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:20px}.preprocessing-page .stage-tile{flex-direction:row;min-height:76px;padding:12px;gap:10px}.preprocessing-page .stage-tile h2{font-size:11px;text-align:left}.preprocessing-page .stage-tile .ui-icon{width:24px;height:24px}.preprocessing-page .stage-tile:last-child{grid-column:1/-1}.preprocessing-page .stage-tile:after{display:none}.preprocessing-page .preprocess-input,.preprocessing-page .live-result{padding:18px}.preprocessing-page .panel-title label,.preprocessing-page .panel-title h2{font-size:18px;gap:10px}.preprocessing-page .panel-title .ui-icon{width:25px;height:25px}.preprocessing-page .live-result .panel-title .badge{display:none}.preprocessing-page .preprocess-input textarea{font-size:14px;padding:14px}.preprocessing-page .example-choices{font-size:11px;gap:6px}.preprocessing-page .example-choices button{font-size:11px;padding:7px 9px}.preprocessing-page .preprocess-input .primary-button{font-size:14px;padding:14px 16px;min-height:52px}.preprocessing-page .highlighted-text{font-size:14px;padding:12px}.entity-legend{gap:8px 12px;margin-bottom:18px}.extracted-values{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.extracted-value{padding:10px;gap:8px}.extracted-value strong{font-size:13px}.extracted-value small{font-size:9px}.preprocess-intent{font-size:12px;gap:12px;align-items:start}.preprocessing-page .tone-row{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) 42px;font-size:10px;gap:8px}.preprocessing-page .pipeline{grid-template-columns:1fr;gap:14px}.preprocessing-page .pipeline-step{padding:18px}.processing-step-description{min-height:0}.preprocessing-page .processing-section-heading h2{font-size:21px}.processing-section-heading:after{display:none}}
