:root{--paper:#f7f8fa;--ink:#202731;--muted:#737c88;--border:#e3e7ec;--blue:#3266df;--coral:#db6247;--mint:#eaf6f0;--green:#267550;--a:#3266df;--b:#db6247;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;font-size:14px}
button,input,select,textarea{font:inherit}
button,a,input,select,summary{touch-action:manipulation}
button{cursor:pointer}
button:disabled{opacity:.5;cursor:wait}
a{color:var(--blue);text-decoration:none}
h1,h2,p{margin-top:0}
h1{font-size:34px;letter-spacing:-1.5px;margin:6px 0 0;font-weight:650}
h2{font-size:17px;letter-spacing:-.35px}
label{display:block;font-size:12px;font-weight:550;color:#58616e}
input,select,textarea{width:100%;border:1px solid var(--border);border-radius:7px;padding:10px 11px;background:white;color:var(--ink);margin-top:6px;outline:none}
input:focus,select:focus,textarea:focus,button:focus-visible,summary:focus-visible{outline:2px solid #8baeff;outline-offset:2px}
input[type=checkbox]{width:auto;margin:0;accent-color:var(--blue)}
select{cursor:pointer}
textarea{resize:vertical}
.topbar{height:70px;display:flex;align-items:center;gap:28px;padding:0 28px;border-bottom:1px solid var(--border);background:white}
.brand{display:flex;gap:8px;align-items:center;font-size:22px;letter-spacing:-.9px;font-weight:650;color:var(--ink)}
.brand b{color:#89919d;font-weight:400}
.brand-icon{display:inline-flex;align-items:center;justify-content:center;background:var(--ink);color:white;width:32px;height:32px;border-radius:8px;font-size:22px;margin-right:6px}
.brand-icon span{font-size:14px;margin-left:-5px;margin-top:-8px}
.local{font-size:10px;letter-spacing:1.4px;color:var(--muted);display:flex;align-items:center;gap:8px}
.local i{width:6px;height:6px;background:#51987a;border-radius:50%}
.top-note{margin-left:auto;font-size:12px;color:var(--muted)}
.workspace{display:grid;grid-template-columns:218px minmax(420px,1fr) 350px;min-height:calc(100vh - 70px)}
.sidebar{padding:27px 20px;background:#fbfcfd;border-right:1px solid var(--border)}
.sidebar label+label{margin-top:16px}
.section-label,.eyebrow{font-size:10px;color:var(--muted);font-weight:650;letter-spacing:1.6px}
.section-label{margin-bottom:19px}
.hint{font-size:12px;line-height:1.65;color:var(--muted);margin:12px 0}
.divider{height:1px;background:var(--border);margin:24px 0}
.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.section-heading h2{font-size:13px;margin:0;letter-spacing:0}
.count,.tiny{font-size:10px;color:var(--muted)}
.count{background:#edf0f4;border-radius:5px;padding:3px 6px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:12px;border:1px solid var(--border);border-radius:7px;padding:11px 15px;background:white;color:var(--ink);font-weight:550;font-size:12px;white-space:nowrap}
.button:hover{filter:brightness(.97)}
.button.primary{background:var(--blue);color:white;border-color:var(--blue);box-shadow:0 3px 7px #3266df18}
.button.dark{background:var(--ink);color:white;border-color:var(--ink)}
.full{width:100%}
.sidebar-foot{color:#9199a5;font-size:11px;line-height:1.8;margin-top:28px}
.library-item{display:flex;gap:8px;align-items:center;margin-top:12px;font-size:11px;cursor:pointer}
.library-item img{width:32px;height:38px;border-radius:4px;object-fit:cover}
.library-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:105px}
.library-empty{border:1px dashed var(--border);border-radius:7px;padding:16px 12px;text-align:center;font-size:11px;color:var(--muted);line-height:1.7;margin-top:14px}
main{padding:28px 26px;min-width:0}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.title-dot{color:var(--blue)}
.status-pill{border:1px solid var(--border);background:white;font-size:10px;color:var(--muted);border-radius:20px;padding:6px 10px;white-space:nowrap}
.status-pill.dirty{background:#fff2e7;color:#a86d2f;border-color:#f2dfcc}
.experiment-bar{display:flex;align-items:flex-end;gap:12px;margin-top:23px}
.experiment-name{flex:1}
.experiment-bar .button{height:39px}
.notes{margin:11px 0 18px;color:var(--muted);font-size:11px}
.notes summary{font-size:11px}
.compare-toolbar{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;align-items:center;margin:20px 0 13px}
.legend{display:flex;gap:14px;font-size:11px;color:#667180}
.legend span{display:flex;align-items:center;gap:6px}
.swatch{display:inline-block;width:7px;height:7px;border-radius:50%}
.a{background:var(--a)}
.b{background:var(--b)}
.actions{display:flex;gap:12px}
.text-button{padding:4px 0;border:0;background:none;color:#697789;font-size:11px;line-height:1.5}
.text-button:hover{color:var(--blue)}
.comparison-wrap{overflow:auto;max-height:calc(100vh - 325px);min-height:400px;background:white;border:1px solid var(--border);border-radius:10px;scrollbar-width:thin}
table{border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed}
th,td{border-bottom:1px solid #edf0f3;text-align:left}
thead th{position:sticky;top:0;z-index:3;background:white;width:210px;padding:0;border-bottom:1px solid var(--border);vertical-align:top}
thead th:first-child{width:194px;left:0;z-index:4;padding:19px 16px;vertical-align:bottom;background:#fafbfd}
tbody th{width:194px;position:sticky;left:0;z-index:2;background:#fafbfd;padding:13px 16px;font-weight:500}
tbody td{padding:12px 16px;height:68px}
tbody tr.selected th,tbody tr.selected td{background:#edf3ff}
tbody tr:hover td,tbody tr:hover th{background:#f4f7fc}
tbody tr{cursor:pointer}
tbody th button{text-align:left;border:0;background:none;padding:0;color:inherit;font-size:12px;font-weight:550;width:100%;line-height:1.45}
.ratio-unit{display:block;font-size:10px;font-weight:400;color:var(--muted);margin-top:4px}
.photo-card{padding:12px 12px 9px;border-left:1px solid #edf0f3}
.photo-header{display:flex;align-items:center;gap:6px;font-size:11px;padding-bottom:9px}
.photo-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.photo-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:130px}
.remove-photo{margin-left:auto;padding:0 3px;border:0;background:none;color:#8f98a4;font-size:17px}
.face-stage{height:195px;background:#edf0f2;border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.face-stage svg{width:100%;height:100%}
.photo-card .text-button{display:block;width:100%;text-align:center;margin-top:7px}
.table-label{font-size:11px;color:var(--muted);font-weight:400;line-height:1.6}
.table-label b{display:block;font-size:13px;color:var(--ink);margin-bottom:5px;font-weight:550}
.raw{font-size:12px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.raw small{color:var(--muted);font-size:10px;font-weight:400}
.scores{display:flex;align-items:center;gap:7px;margin-top:6px;font-size:11px;font-variant-numeric:tabular-nums}
.score-a{color:var(--a)}
.score-b{color:var(--b);font-weight:600}
.delta{font-size:9px;border-radius:4px;padding:2px 4px;background:#eef1f5;color:#7b8797}
.delta.up{background:#e9f4ed;color:#3d8663}
.delta.down{background:#fbedeb;color:#ba6c5e}
.no-value{font-size:10px;color:#939ba6;font-weight:400;line-height:1.5}
.empty-photo{height:249px;padding:36px 20px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:linear-gradient(145deg,#fafbfd,#f0f3f8);margin:12px;border:1px dashed #d6dde7;border-radius:7px;gap:13px;color:#929dab;font-size:11px;font-weight:400}
.empty-icon{font-size:29px;border:1px solid #dce2ea;border-radius:50%;width:64px;height:64px;display:grid;place-items:center;background:#fff9}
.empty-photo b{color:#69788d;font-size:12px;font-weight:500}
.footnote{font-size:10px;color:#8b95a2;line-height:1.7;margin-top:12px}
.inspector{border-left:1px solid var(--border);background:white;padding:27px 23px;min-width:0}
.inspector>select{font-size:12px;margin:0 0 19px}
.inspector h2{font-size:20px;line-height:1.3;margin:0}
.inspector #ratio-description{min-height:38px}
.chart-wrap{margin:14px -8px 0}
.chart-wrap svg{width:100%;display:block;touch-action:none;overflow:visible}
.chart-caption{display:flex;justify-content:space-between;font-size:9px;color:var(--muted);margin:0 0 18px}
.thresholds{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.thresholds label{font-size:10px;line-height:1.5}
.thresholds input{font-size:14px;font-weight:550;padding:10px}
.thresholds label small{color:var(--coral);float:right;font-size:10px}
.error{font-size:11px;line-height:1.5;color:#b64535;min-height:14px;margin:10px 0}
.impact{background:#f5f7fa;border:1px solid #edf0f3;border-radius:7px;padding:12px;font-size:11px;line-height:1.8;color:#6b7788;margin-bottom:7px}
.impact b{color:var(--ink);font-weight:550}
summary{cursor:pointer;font-size:12px;line-height:1.6;font-weight:550}
summary .tiny{float:right}
.mapping-row{display:grid;grid-template-columns:1fr 95px;gap:8px;align-items:center;margin:7px 0}
.mapping-row label{font-size:10px;font-weight:400;color:var(--muted)}
.mapping-row input{font-size:11px;margin:0;padding:7px;width:95px}
.mapping-row.invalid input{border-color:#c25642}
.inspector details p,.inspector details a{font-size:11px;line-height:1.6}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
dialog{border:1px solid var(--border);border-radius:15px;padding:26px;max-width:510px;width:calc(100% - 32px);box-shadow:0 24px 80px #14203930;color:var(--ink)}
dialog::backdrop{background:#17223570;backdrop-filter:blur(3px)}
.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}
.dialog-head h2{font-size:25px;margin:7px 0 18px}
.icon-button{background:#f1f3f6;border:0;border-radius:50%;width:29px;height:29px;font-size:21px;color:#7b8591}
dialog p{font-size:12px;line-height:1.7;color:var(--muted)}
.drop-zone{padding:25px;background:#f5f8fe;border:1px dashed #b8caec;border-radius:8px;text-align:center;margin:18px 0;cursor:pointer;color:var(--blue)}
.drop-zone input{font-size:11px;background:transparent;border:0;padding:8px 0 0}
dialog details{margin-bottom:18px}
.landmark-dialog{max-width:1180px;width:calc(100vw - 48px);max-height:94vh;overflow:auto}
.editor-layout{display:grid;grid-template-columns:minmax(300px,1fr) 240px;gap:24px}
.editor-photo{background:#e9edf2;border-radius:9px;display:flex;align-items:center;justify-content:center;min-height:400px;height:65vh}
.editor-photo svg{width:100%;height:100%;touch-action:none;outline-offset:3px}
.editor-tools .button{margin:8px 0 0}
.editor-tools .checkbox{display:flex;align-items:center;gap:8px;margin:17px 0;font-size:11px}
.coordinate-fields{display:flex;gap:8px;margin-top:11px}
.coordinate-fields label{width:50%}
.editor-result{padding:12px;background:#f5f7fa;border-radius:7px;margin:16px 0;font-size:12px;line-height:1.7}
.editor-result strong{font-size:17px}
.wrap{flex-wrap:wrap;gap:5px 16px}
#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#202c3f;color:white;z-index:20;padding:14px 22px;border-radius:9px;box-shadow:0 8px 30px #0002;font-size:12px;max-width:90vw;line-height:1.6}
#toast.error-toast{background:#8a3c31}
#library{max-height:300px;overflow:auto}
@media(min-width:1600px){.workspace{grid-template-columns:235px minmax(500px,1fr) 385px}
main{padding:32px 35px}
.inspector{padding:30px}
.face-stage{height:230px}
thead th{width:240px}
}
@media(max-width:1150px) and (min-width:901px){.workspace{grid-template-columns:165px minmax(360px,1fr) 300px}
.sidebar{padding:25px 14px}
main{padding:26px 18px}
.inspector{padding:26px 16px}
}
@media(max-width:900px){.workspace{grid-template-columns:185px minmax(390px,1fr)}
.inspector{grid-column:2;border-top:1px solid var(--border);border-left:0}
.sidebar{grid-row:1/3;padding:25px 16px}
.chart-wrap{max-width:480px}
.thresholds{grid-template-columns:repeat(4,1fr)}
.comparison-wrap{max-height:650px}
.inspector #ratio-description{min-height:0}
}
@media(max-width:680px){.topbar{padding:0 16px;gap:12px;height:60px}
.top-note{display:none}
.local{font-size:8px;letter-spacing:1px;margin-left:auto}
.brand{font-size:19px}
.workspace{display:block}
.sidebar{padding:18px;display:grid;grid-template-columns:1fr 1fr;gap:12px;border-right:0;border-bottom:1px solid var(--border)}
.sidebar>label+label{margin:0}
.sidebar .section-label,.sidebar>.hint,.sidebar .divider,.sidebar .sidebar-foot{display:none}
.sidebar .section-heading{margin:5px 0;align-self:center}
.sidebar .full{align-self:center}
.sidebar #library{grid-column:1/-1;display:flex;gap:12px;overflow:auto}
.sidebar #history{margin:0}
.sidebar #version-info{grid-column:1/-1;margin:0;font-size:10px}
.sidebar .library-empty{display:none}
.library-item{flex-shrink:0;margin:0}
main{padding:23px 16px}
.page-heading h1{font-size:29px}
.experiment-bar{gap:8px}
.experiment-bar .button{font-size:10px;padding:10px}
.inspector{padding:23px 20px}
.thresholds{grid-template-columns:1fr 1fr}
.comparison-wrap{max-height:650px}
.editor-layout{display:block}
.editor-photo{height:52vh;min-height:280px}
.editor-tools{margin-top:20px}
.landmark-dialog{width:calc(100vw - 16px);padding:17px}
.coordinate-fields{max-width:260px}
.editor-tools .button{max-width:270px}
.topbar .brand-icon{width:26px;height:28px}
thead th:first-child,tbody th{width:155px}
.compare-toolbar .actions{gap:16px}
}


/* Keep two comparison faces visible at typical laptop widths. */
table{min-width:100%}
thead th{width:190px}
thead th:first-child,tbody th{width:160px}

[hidden]{display:none!important}
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;box-sizing:border-box;background:radial-gradient(ellipse at 15% 10%,#e9effc,transparent 55%),var(--paper)}
.login-card{width:100%;max-width:430px;box-sizing:border-box;background:white;border:1px solid var(--border);border-radius:18px;padding:40px;box-shadow:0 18px 70px #2027310a}
.login-card .brand{display:flex;margin-bottom:40px;align-items:center;gap:8px}
.login-card h1{margin-bottom:14px}.login-card form{margin-top:26px}.login-card label{margin-bottom:18px}.login-card .login-foot{margin:25px 0 0;font-size:12px;line-height:1.6}
