@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/dm-sans.woff2") format("woff2");
}
:root {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: #232e27;
  background: #f6f7f3;
  font-synthesis: none;
  --ink: #232e27;
  --muted: #646f66;
  --green: #285a40;
  --border: #dce1d9;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { border: 0; background: none; }
a { color: inherit; }
button:disabled { cursor: wait; opacity: .58; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .file-tile:focus-within {
  outline: 3px solid #5b8f64; outline-offset: 3px;
}
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { width: 19px; height: 19px; display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.page-width { width: min(1392px, calc(100% - clamp(40px, 8vw, 144px))); margin-inline: auto; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); }
.nav-row { display: flex; align-items: center; gap: clamp(32px, 5vw, 72px); height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #23392b; font-weight: 800; font-size: 1.45rem; letter-spacing: -.075em; text-decoration: none; }
.brand img { display: block; }
.nav-row nav { display: flex; align-items: center; gap: 9px; }
.nav-link { height: 35px; padding: 0 12px; border-radius: 7px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: .875rem; font-weight: 550; color: #59655b; white-space: nowrap; }
.nav-link .icon { width: 16px; height: 16px; }
.nav-link.active { color: #2c5637; background: #eef3e8; font-weight: 650; }
.nav-link:hover { background: #f0f3ed; color: #274e36; }
.privacy { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: #58685b; font-size: .8125rem; }
.privacy .icon { color: #658568; width: 15px; height: 15px; }
main { padding: clamp(30px, 3.05vw, 48px) 0 46px; }
.intro, .field-row, .preview-heading, .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.intro { margin-bottom: 28px; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(2.1rem, 2.75vw, 2.85rem); line-height: 1.1; letter-spacing: -.062em; font-weight: 650; }
.intro p { color: var(--muted); margin-top: 9px; font-size: 1rem; letter-spacing: -.012em; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 15px; min-height: 40px; border-radius: 8px; font-size: .875rem; font-weight: 650; line-height: 1.2; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.btn .icon { width: 17px; height: 17px; }
.light, .icon-btn { background: #fff; border: 1px solid #d2d9cf; box-shadow: 0 1px 2px #243b2810; }
.light:hover, .icon-btn:hover { background: #f2f5ef; border-color: #9dac9d; }
.btn.reset { font-size: .8125rem; min-height: 36px; color: #49544b; }
.reset .icon { height: 15px; width: 15px; }
.workspace { display: grid; grid-template-columns: minmax(272px, 27%) minmax(0, 1fr); gap: 22px; align-items: start; }
.controls, .results { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card { min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 2px 4px #31422d04; }
.card-heading, .section-title, .preview-tools, .palette-label { display: flex; align-items: center; }
.card-heading, .section-title { gap: 10px; }
.card-heading { padding: 18px 20px; border-bottom: 1px solid #e7eae3; }
.card-heading > .icon, .section-title > .icon { color: #48604c; }
h2 { font-size: 1.0625rem; font-weight: 650; line-height: 1.25; letter-spacing: -.033em; }
.card-body { padding: 17px 20px 19px; }
.files { display: grid; gap: 15px; }
.field-label { display: block; font-size: .875rem; font-weight: 575; letter-spacing: -.012em; }
.file-tile { display: flex; align-items: center; position: relative; margin-top: 7px; padding: 7px; gap: 11px; border: 1px dashed #c4cfc1; background: #fafbf8; border-radius: 9px; cursor: pointer; min-width: 0; transition: background .15s, border-color .15s; }
.file-tile:hover, .file-tile.is-dragging { border-color: #5e8564; background: #f0f5eb; }
.thumb { display: block; width: 57px; height: 48px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.file-detail { min-width: 0; display: grid; gap: 3px; }
.file-detail strong { font-weight: 570; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-detail small, .range-ends { color: var(--muted); font-size: .765625rem; }
.file-detail small { font-variant-numeric: tabular-nums; }
.file-action { margin-left: auto; color: #657467; padding: 5px; }
.file-action .icon { width: 16px; height: 16px; }
#reference-drop.is-empty { min-height: 61px; padding-inline: 12px; }
#reference-count { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
#reference-list { display: grid; gap: 2px; margin: 7px 0 0; padding: 0; list-style: none; max-height: 148px; overflow-y: auto; }
#reference-list[hidden], #reference-thumb[hidden] { display: none; }
.reference-item { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 2px 1px; }
.reference-item img { width: 30px; height: 27px; object-fit: cover; border-radius: 4px; }
.reference-item-name { color: #536056; font-size: .8125rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reference-remove { flex: none; margin-left: auto; border-radius: 5px; width: 30px; height: 30px; padding: 0; color: #57695a; font-size: 1.125rem; line-height: 1; }
.reference-remove:hover { background: #edf2e9; }
.reference-remove:focus-visible { outline-offset: -3px; }
.add-photos { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; margin-top: 5px; font-size: .8125rem; font-weight: 650; color: var(--green); cursor: pointer; }
.add-photos > span { font-size: 1.1rem; font-weight: 500; }
.add-photos:hover { text-decoration: underline; }
.add-photos:focus-within { outline: 2px solid #5b8f64; outline-offset: 2px; border-radius: 3px; }
#reference-message { margin-top: 4px; color: #8e452d; font-size: .8125rem; line-height: 1.4; overflow-wrap: anywhere; }
#reference-message:empty { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; }
.settings { display: grid; gap: 19px; }
.field-row output { min-width: 45px; text-align: center; padding: 3px 7px; border: 1px solid #dce4d7; background: #f2f6ed; color: #3a6445; border-radius: 5px; font-weight: 650; font-size: .78125rem; font-variant-numeric: tabular-nums; }
#strength { --value: 85%; appearance: none; display: block; margin: 9px 0 3px; width: 100%; height: 18px; background: transparent; cursor: pointer; }
#strength::-webkit-slider-runnable-track { height: 5px; border-radius: 8px; background: linear-gradient(to right, #41754c 0 var(--value), #e0e5dc var(--value) 100%); }
#strength::-moz-range-track { height: 5px; border-radius: 8px; background: #e0e5dc; }
#strength::-moz-range-progress { height: 5px; background: #41754c; border-radius: 8px; }
#strength::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border: 2.5px solid #fff; background: #47794f; border-radius: 50%; margin-top: -5.5px; box-shadow: 0 0 0 1px #89a18a, 0 1px 3px #30452f33; }
#strength::-moz-range-thumb { width: 12px; height: 12px; border: 2px solid #fff; background: #47794f; border-radius: 50%; box-shadow: 0 0 0 1px #89a18a; }
.range-ends { display: flex; justify-content: space-between; }
.select-wrap { position: relative; margin-top: 8px; }
select { appearance: none; width: 100%; height: 39px; background: #fff; border: 1px solid #d8dfd5; border-radius: 7px; padding: 0 35px 0 12px; font-size: .875rem; }
.select-wrap .icon { pointer-events: none; position: absolute; right: 12px; top: 12px; width: 16px; height: 16px; color: #58665a; }
.primary, .export { background: var(--green); color: white; border: 1px solid #26563d; }
.primary:hover, .export:hover { background: #1e4631; }
.generate { width: 100%; min-height: 42px; }
.generate .icon { width: 18px; height: 18px; }
.preview-heading { padding: 16px 19px; min-height: 64px; }
.preview-tools { gap: 12px; }
.segmented { display: flex; padding: 3px; border-radius: 7px; background: #f0f2ed; }
.segmented button { color: #626d63; border: 1px solid transparent; border-radius: 5px; font-size: .8125rem; font-weight: 550; min-height: 26px; padding: 2px 10px; }
.segmented button[aria-pressed="true"] { background: #fff; color: #2d4632; border-color: #dce1d7; box-shadow: 0 1px 2px #253a2312; }
.icon-btn { display: inline-flex; justify-content: center; align-items: center; width: 32px; height: 32px; border-radius: 7px; padding: 6px; color: #566358; }
.icon-btn .icon { width: 16px; height: 16px; }
.preview-inset {
  display: grid;
  place-items: center;
  margin: 0 12px;
  overflow: hidden;
  border-radius: 8px;
  background-color: #26342d;
}
#compare {
  --source-ratio: 1.77778;
  position: relative;
  isolation: isolate;
  width: min(100%, calc(72vh * var(--source-ratio)));
  aspect-ratio: var(--source-ratio);
  overflow: hidden;
}
#compare canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#source-canvas { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
#graded-canvas { clip-path: inset(0 0 0 var(--split)); }
.image-label { position: absolute; top: 16px; display: inline-flex; align-items: center; min-height: 25px; padding: 3px 10px; background: #1b2925bd; color: #fff; border: 1px solid #ffffff38; border-radius: 5px; font-size: .75rem; font-weight: 550; line-height: 1; pointer-events: none; }
.original { left: 16px; }.matched { right: 16px; }
.divider { position: absolute; inset-block: 0; left: var(--split); transform: translateX(-50%); width: 2px; background: #fff; box-shadow: 0 0 3px #17231f68; pointer-events: none; }
.handle { display: grid; place-items: center; position: absolute; top: 50%; left: 50%; width: 37px; height: 37px; border-radius: 50%; background: #fffffff7; color: #435648; box-shadow: 0 2px 8px #182d2645; transform: translate(-50%, -50%); }
.handle .icon { width: 21px; height: 21px; }
#split { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
#split::-webkit-slider-thumb { appearance: none; width: 1px; height: 30px; }
#split::-moz-range-thumb { width: 1px; height: 30px; border: 0; }
#compare:has(#split:focus-visible) .handle { outline: 3px solid #8eb69f; outline-offset: 4px; }
.matched-only #graded-canvas { clip-path: none; }
.matched-only .divider, .matched-only #split, .matched-only .original, .matched-only #source-canvas { display: none; }
#compare.no-reference #source-canvas { display: block; clip-path: none; }
#compare.no-reference .original { display: inline-flex; }
#compare.no-reference :is(.divider, .matched, #split, #graded-canvas) { display: none; }
.preview-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; min-height: 63px; padding: 15px 20px; }
.palette-label { font-size: .8125rem; font-weight: 550; color: #535f55; gap: 8px; }
.palette-label .icon { width: 17px; height: 17px; }
#palette { display: flex; align-items: center; gap: 4px; }
.swatch { width: 27px; height: 19px; border-radius: 4px; box-shadow: inset 0 0 0 1px #1c281918; }
.export-card { display: flex; align-items: center; gap: 13px; padding: 18px 20px; border: 1px solid #d4dfce; border-radius: 13px; background: #ebf1e6; }
.export-icon { width: 43px; height: 43px; border: 1px solid #cfddc6; border-radius: 11px; display: grid; place-items: center; background: #e1ebd9; color: #466746; flex: none; }
.export-icon .icon { width: 22px; height: 22px; stroke-width: 1.5; }
.export-info { min-width: 0; }
.export-info h2 { color: #2c4431; }
#status { font-size: .8125rem; color: #526c53; margin-top: 4px; }
#status.is-error { color: #9f3e2a; }
.export-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.export-actions .btn { min-height: 38px; }
.export-actions .light { background: #f9fbf6; }
.export-actions .light:hover { background: #fff; }
.preview-expanded { overflow: hidden; }
#preview-panel:fullscreen, #preview-panel.is-expanded { display: flex; flex-direction: column; background: #fff; width: 100%; height: 100%; border: 0; border-radius: 0; }
#preview-panel.is-expanded { position: fixed; inset: 0; z-index: 10; height: 100dvh; }
#preview-panel:is(:fullscreen, .is-expanded) .preview-inset { flex: 1; min-height: 0; container-type: size; }
#preview-panel:is(:fullscreen, .is-expanded) #compare { width: min(100%, calc(100cqh * var(--source-ratio))); }
dialog { color: var(--ink); border: 1px solid var(--border); width: min(490px, calc(100% - 32px)); padding: 0; border-radius: 15px; box-shadow: 0 20px 80px #14241c35; }
dialog::backdrop { background: #182a2085; }
.dialog-heading { padding: 16px 21px; border-bottom: 1px solid var(--border); }
.guide-body { padding: 21px; }.guide-body h3 { font-size: 1rem; margin-bottom: 4px; }
.guide-body p { color: var(--muted); font-size: .9375rem; line-height: 1.55; }
.guide-body h3:not(:first-child) { margin-top: 18px; }
.guide-body .guide-credit { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 14px; font-size: .8125rem; }
.guide-credit a { color: var(--green); }
@media(min-width: 1560px) {
  .preview-inset { margin-inline: 14px; }
  .card-body { padding: 21px 23px; }.card-heading { padding: 20px 23px; }
}
@media(max-width: 1100px) {
  .page-width { width: calc(100% - 48px); }.workspace { gap: 16px; grid-template-columns: 274px minmax(0,1fr); }
  .card-body, .card-heading { padding-inline: 16px; }.preview-heading { padding-inline: 15px; }
  .export-card { padding: 15px; gap: 10px; }.export-actions .btn { padding-inline: 11px; }
}
@media(max-width: 860px) and (min-width: 701px) {
  .page-width { width: calc(100% - 32px); }.workspace { grid-template-columns: 240px minmax(0,1fr); }
  .preview-heading { gap: 8px; }.preview-tools { gap: 6px; }.segmented button { padding-inline: 7px; }
  .preview-heading .section-title { gap: 6px; }.preview-heading .section-title > .icon { display: none; }
  .export-card { flex-wrap: wrap; }.export-actions { flex-basis: 100%; margin-top: 3px; }.export-actions button { flex: 1; }
  .thumb { width: 44px; }.file-tile { gap: 7px; }
}
@media(max-width: 700px) {
  .page-width { width: calc(100% - 32px); }.nav-row { height: 62px; gap: 18px; }
  .brand { font-size: 1.3rem; gap: 8px; }.brand img { width: 31px; height: 31px; }
  .nav-row nav { margin-left: auto; gap: 0; }.nav-link.active { display: none; }.nav-link { padding-inline: 5px; }
  .privacy { display: none; }main { padding-top: 26px; }.intro { margin-bottom: 20px; }
  h1 { font-size: 2rem; }.intro p { font-size: .9375rem; line-height: 1.45; }
  .workspace { display: flex; flex-direction: column; gap: 15px; }.controls,.results { display: contents; }
  .workspace section { width: 100%; }.input-card { order: 1; }.preview-card { order: 2; }.settings-card { order: 3; }.export-card { order: 4; }
  .files { grid-template-columns: minmax(0, 1fr); gap: 12px; }.file-field { min-width: 0; }
  .card-body { padding-block: 15px; }.card-heading { padding-block: 14px; }
  .field-label { font-size: .8125rem; }.thumb { width: 43px; height: 42px; }.file-tile { gap: 7px; }
  .file-action { padding: 2px; }.preview-heading { padding-block: 12px; min-height: 54px; }
  .preview-footer { min-height: 52px; padding: 12px 15px; }.export-actions .btn { font-size: .8125rem; }
}
@media(max-width: 480px) {
  .intro { flex-wrap: wrap; row-gap: 12px; }.btn.reset { min-height: 30px; padding: 0 9px; font-size: .75rem; }
  .file-tile .thumb { width: 48px; height: 42px; }.file-detail strong { font-size: .8125rem; }
  .file-detail small { font-size: .75rem; }.preview-inset { margin-inline: 8px; }.preview-tools { gap: 6px; }
  .preview-heading { padding-inline: 12px; gap: 5px; }.preview-heading .section-title { gap: 7px; }
  .segmented button { font-size: .75rem; padding-inline: 7px; }.preview-tools .icon-btn { width: 28px; height: 29px; }
  .preview-footer { gap: 9px; }.swatch { width: 21px; height: 16px; }.image-label { top: 9px; min-height: 21px; padding-inline: 7px; }.original { left: 9px; }.matched { right: 9px; }
  .handle { width: 30px; height: 30px; }.export-card { flex-wrap: wrap; }.export-actions { flex: 1 0 100%; margin-top: 3px; }.export-actions button { flex: 1; }
}
@media(max-width: 350px) {
  .page-width { width: calc(100% - 20px); }.preview-heading .section-title > .icon { display: none; }
  .preview-tools { gap: 3px; }.nav-row { gap: 8px; }.card-heading, .card-body { padding-inline: 12px; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
