:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#192c40;background:#f3f6f9;font-synthesis:none;line-height:1.6}*{box-sizing:border-box}body{margin:0}a{color:#204e80;text-underline-offset:4px}a:hover{color:#0a3059}.header,footer{max-width:1160px;margin:auto;padding:25px 32px;display:flex;justify-content:space-between;gap:20px;align-items:center}.header{border-bottom:1px solid #d8e1e9}.brand{display:flex;align-items:center;gap:12px;font-weight:750;font-size:22px;text-decoration:none;color:#192c40}.brand-icon{background:#192c40;color:white;padding:6px 9px;font-size:16px;border-radius:5px}main{max-width:1096px;margin:60px auto 70px;padding:0 24px}.intro{max-width:730px;margin-bottom:36px}.eyebrow{font-size:13px;letter-spacing:.15em;font-weight:750;color:#54718a;margin:0 0 12px}h1{font-size:clamp(36px,5.5vw,62px);line-height:1.1;letter-spacing:-.045em;margin:0 0 24px;font-weight:700}h2{font-size:24px;letter-spacing:-.025em;margin:0 0 10px;line-height:1.3}h3{font-size:18px;margin-bottom:8px}p{margin:0 0 20px}.lead{font-size:19px;color:#526578;max-width:650px}.workspace{display:grid;grid-template-columns:1.65fr 1fr;gap:36px}.panel{background:white;border:1px solid #d8e1e9;border-radius:12px;padding:32px;box-shadow:0 5px 20px #192c4005}.panel>p,.notes p{color:#526578}.dropzone{position:relative;border:1px dashed #8da5ba;background:#f7fafd;border-radius:8px;display:flex;align-items:center;flex-direction:column;padding:24px;cursor:pointer;gap:4px}.dropzone:hover,.dropzone.dragging{background:#e9f1f9;border-color:#204e80}.dropzone:focus-within{outline:3px solid #3072b8;outline-offset:3px}.upload-icon{font-size:36px;line-height:1.2;color:#36658d}.file-hint{font-size:14px;color:#526578;margin-top:8px}.dropzone input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.file-name{font-size:14px;margin:10px 0 22px;overflow-wrap:anywhere}.consent{display:flex;align-items:flex-start;gap:10px;font-size:14px;color:#526578;margin-bottom:24px}.consent input{margin-top:5px;min-width:18px;min-height:18px;accent-color:#204e80}button,.button{display:inline-block;background:#204e80;color:white;border:0;border-radius:6px;padding:12px 22px;font:600 16px/1.5 system-ui;text-align:center;text-decoration:none;cursor:pointer}button{width:100%}button:hover,.button:hover{background:#163e68;color:white}button:disabled{opacity:.6;cursor:wait}:focus-visible{outline:3px solid #4386c9;outline-offset:4px}.notes{padding:24px 8px}.notes hr{border:0;border-top:1px solid #d8e1e9;margin:28px 0}#status:empty{display:none}#status{margin:18px 0 0;color:#204e80}#status.error{color:#ad2739}.result{margin-top:32px}.result-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}.result img{display:block;max-width:100%;max-height:75vh;margin:auto;background:repeating-conic-gradient(#eef1f4 0% 25%,white 0% 50%) 0/20px 20px}.result>p{margin:24px 0 0;font-size:14px}footer{border-top:1px solid #d8e1e9;font-size:14px;color:#526578}.about{max-width:850px}.about .panel h2:not(:first-child){margin-top:32px}[hidden]{display:none!important}@media(max-width:700px){.header,footer{padding:20px;align-items:flex-start}.header>a:last-child{font-size:14px;max-width:130px;text-align:right}main{margin-top:38px;padding:0 20px}.workspace{grid-template-columns:1fr;gap:12px}.panel{padding:24px}.notes{padding:24px 4px}.result-heading,footer{flex-direction:column}.result-heading{align-items:flex-start}}

/* Upload preview and replacement result panel. */
.workspace > .panel{min-width:0}
.dropzone{height:210px;overflow:hidden;justify-content:center}
#upload-preview{position:absolute;inset:10px 10px 44px;width:calc(100% - 20px);height:calc(100% - 54px);max-width:none;max-height:none;object-fit:contain;margin:0;background:repeating-conic-gradient(#eef1f4 0% 25%,white 0% 50%) 0/20px 20px}
.dropzone.has-preview > span{display:none}
.dropzone.has-preview #choose-label{position:absolute;bottom:10px;left:10px;right:10px;text-align:center;font-size:14px}
.dropzone input{z-index:1}
#result-image{width:100%;height:210px;max-height:none;object-fit:contain;object-position:center}
.workspace > .result{margin-top:0}
.result-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.result-actions > *{flex:1 1 180px}
button.secondary{background:white;color:#204e80;border:1px solid #204e80}
button.secondary:hover{background:#e9f1f9}
.dropzone.processing{cursor:wait}
.dropzone.processing > :not(#processing-placeholder){display:none}
.dropzone.processing #processing-placeholder{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
#processing-elapsed{font-variant-numeric:tabular-nums}
.processing-spinner{width:32px;height:32px;border:3px solid #d8e1e9;border-top-color:#204e80;border-radius:50%;animation:processing-spin 1s linear infinite}
@keyframes processing-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.processing-spinner{animation:none}}

#enlarge-result{position:relative;display:block;padding:0;border:0;background:transparent;border-radius:6px;cursor:zoom-in;height:210px}
.enlarge-hint{position:absolute;right:8px;bottom:8px;padding:4px 10px;border-radius:4px;background:#192c40e6;color:white;font-size:14px;pointer-events:none}
.image-dialog-open{overflow:hidden}
#image-dialog{width:94vw;max-width:1600px;height:92vh;height:92dvh;max-height:none;padding:60px 16px 16px;border:1px solid #526578;border-radius:12px;background:#192c40;overflow:hidden}
#image-dialog::backdrop{background:#081321d9}
#image-dialog:not([open]){display:none}
#image-dialog[open]{display:block;position:fixed;inset:0;margin:auto;z-index:10000;box-shadow:0 0 0 100vmax #081321d9}
#large-result-image{display:block;width:100%;height:100%;object-fit:contain;background:repeating-conic-gradient(#eef1f4 0% 25%,white 0% 50%) 0/20px 20px}
#close-image-dialog{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:44px;height:44px;padding:0;font-size:32px;line-height:1;background:white;color:#192c40;border:1px solid #d8e1e9}
#close-image-dialog:hover{background:#d8e1e9}
.hint-area{margin:0 0 24px;padding:16px;border:1px solid #d8e1e9;border-radius:8px;min-width:0}
.hint-area legend{font-weight:600;padding:0 6px}
.hint-area legend span,.hint-area p{font-size:14px;font-weight:400;color:#526578}
.hint-area p{margin:0 0 10px}
.hint-area label{display:flex;align-items:center;gap:10px;margin:8px 0;cursor:pointer}
.hint-area input{width:18px;height:18px;flex-shrink:0;accent-color:#204e80}
.result-verdict{margin-top:24px;padding:20px;border:1px solid #d8e1e9;border-radius:8px;background:#f7fafd}
#result-hints{list-style:none;padding:0;margin:0 0 16px;color:#526578}
#result-hints li{margin:6px 0}
#result-hints s{text-decoration-thickness:2px}
.result-verdict p{margin:0;font-weight:750;font-size:24px;color:#de0a26}

