:root {
  color-scheme: light;
  --paper: #f7f5f1;
  --light: #fffdf9;
  --ink: #292433;
  --muted: #625b65;
  --plum: #553447;
  --brick: #9a4f38;
  --line: #d9d1c9;
  --body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display: Bahnschrift, "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
body > main { flex: 1; }
img { max-width: 100%; }
h1,h2,h3,p,figure { margin: 0; }
a { color: var(--plum); text-underline-offset: .19em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 4px; }
.skip-link { position: absolute; z-index: 8; left: 12px; top: -100px; padding: 7px 16px; background: var(--light); }
.skip-link:focus { top: 12px; }
.wrap, .nav-shell { width: min(90%, 1320px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.nav-shell { min-height: 75px; display: flex; justify-content: space-between; align-items: stretch; gap: 18px; }
.brand, .footer-brand { color: var(--ink); text-decoration: none; letter-spacing: -.064em; font-weight: 750; }
.brand { display: inline-flex; align-items: center; font-size: 27px; line-height: 1; }
.brand img { display: block; width: 28px; height: 28px; margin-right: 7px; }
.brand span, .title-stop { color: var(--brick); }
.site-nav { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.site-nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; white-space: nowrap; font-size: .94rem; color: var(--muted); font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current=page] { color: var(--plum); }
.site-nav a[aria-current=page] { box-shadow: inset 0 -2px var(--plum); }
.site-footer { margin-top: auto; }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 25px; }
.site-footer a:last-child { color: var(--muted); font-size: .875rem; }
.site-footer .footer-brand { font-size: 1.05rem; }
.page-title {
  font: 750 clamp(2.7rem, 5.5vw, 5.35rem)/.95 var(--display);
  font-stretch: condensed; font-variation-settings: "wdth" 80;
  letter-spacing: -.058em; text-transform: uppercase; text-wrap: balance;
}
.page-intro, .home-lead { color: var(--muted); font-size: clamp(1.08rem, 1.33vw, 1.32rem); line-height: 1.53; }
.primary, .secondary {
  display: inline-flex; justify-content: center; align-items: center; min-height: 48px;
  padding: 10px 22px; border-radius: 7px; border: 1px solid transparent;
  font-weight: 650; text-decoration: none; text-align: center;
}
.primary { color: var(--light); background: var(--plum); }
.primary:hover { background: #422636; }
.secondary { color: var(--plum); border-color: var(--line); background: var(--light); }
.secondary:hover { border-color: var(--plum); }
.prose { max-width: 70ch; }
.prose h2 { font: 400 clamp(1.65rem, 3vw, 2.2rem)/1.15 var(--serif); letter-spacing: -.035em; }
.prose p, .prose li { line-height: 1.65; }
.prose p + p { margin-top: .85em; }
.article-page .prose { margin-inline: auto; padding-block: clamp(36px, 6vw, 88px); }
.article-page .page-intro { margin-top: 1.25rem; }
.article-page .prose h2 { margin: 2.2rem 0 .65rem; }
.article-page figure { margin: 1rem 0 1.25rem; }
.article-page figure svg { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.article-page figcaption { margin-top: .45rem; font-size: .875rem; color: var(--muted); }
.retake-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 2vw, 18px); max-width: 490px; }
.retake-pair figure { margin: .9rem 0; }
.retake-pair img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.retake-pair strong { color: var(--ink); white-space: nowrap; }
.home-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center; gap: clamp(32px, 4.45vw, 74px); padding-block: clamp(38px, 4.6vw, 73px);
}
.home-title { font-size: clamp(3.3rem, 6.15vw, 6.95rem); line-height: .90; }
.title-line { white-space: nowrap; }
.home-lead { margin-top: 25px; max-width: 33ch; }
.home-actions { margin-top: 26px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.home-private { margin-top: 15px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .875rem; }
.lock-icon { width: 11px; height: 9px; border: 1.3px solid; border-radius: 2px; position: relative; margin-left: 1px; }
.lock-icon::before { content: ""; position: absolute; top: -6px; left: 1.5px; right: 1.5px; height: 5px; border: 1.3px solid; border-bottom: 0; border-radius: 5px 5px 0 0; }
.portrait-panel { margin: 0; min-width: 0; background: var(--light); border: 1px solid #cfc6be; border-radius: 12px; overflow: hidden; box-shadow: 0 13px 26px -21px #513c4a70; }
.example-photo { --position: 29%; isolation: isolate; position: relative; aspect-ratio: 1.5; background: #d4cabb; }
.example-photo > img, .example-photo canvas, .example-photo input { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.example-photo > img { object-fit: contain; }
.example-photo canvas { pointer-events: none; }
.example-photo:focus-within { outline: 3px solid var(--plum); outline-offset: -3px; }
.example-divider { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.example-divider::before { content: ""; position: absolute; inset-block: 0; left: var(--position); width: 1px; background: #fffaf3; box-shadow: 0 0 1px 1px #503d3835; }
.example-divider span {
  display: flex; align-items: center; justify-content: center; gap: 3px; position: absolute;
  width: 36px; height: 36px; left: clamp(20px, var(--position), calc(100% - 20px)); top: 76%;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--plum); border: 1px solid #f7e8db; box-shadow: 0 2px 8px #261a2c33;
}
.example-divider span::before, .example-divider span::after { content: ""; width: 6px; height: 6px; border: solid white; border-width: 0 0 1.4px 1.4px; }
.example-divider span::before { transform: rotate(45deg); }
.example-divider span::after { transform: rotate(225deg); }
.example-photo input { z-index: 2; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.example-caption { display: grid; min-height: 128px; padding: 20px 22px; }
.example-caption > div { grid-area: 1 / 1; }
.example-caption [aria-hidden="true"] { visibility: hidden; }
.example-caption h3 { font: 400 clamp(1.42rem, 2.1vw, 1.9rem)/1.1 var(--serif); letter-spacing: -.035em; }
.example-caption p { font-size: .96rem; line-height: 1.45; color: var(--muted); margin-top: 7px; max-width: 52ch; }
.example-caption p strong { display: block; margin-bottom: .2em; color: var(--ink); font-weight: 600; }
.home-explorer { min-width: 0; }
.home-explorer > h2, .library-heading h2 {
  font: 400 clamp(1.85rem, 3vw, 2.7rem)/1.08 var(--serif); letter-spacing: -.045em;
}
.rating-intro, .library-heading p { color: var(--muted); margin-top: .5rem; line-height: 1.45; }
.rating-intro { max-width: 62ch; margin-bottom: 1rem; }
.feature-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .7rem; }
.feature {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; min-height: 40px;
  border: 1px solid var(--line); border-radius: 24px; background: var(--light); color: var(--ink); font-size: .875rem; font-weight: 600;
}
.feature-thumb { width: 27px; height: 27px; border-radius: 50%; flex: none; background: #ddd3c8 url("/assets/studio-hero.webp") no-repeat; }
.eye-slope { background-size: 510%; background-position: 49.9% 28%; }
.eye-spacing { background-size: 645%; background-position: 50.6% 30.7%; }
.alignment { background-size: 340%; background-position: 50.7% 38%; }
.mouth-width { background-size: 660%; background-position: 50.7% 48%; }
.feature:enabled:hover { border-color: var(--plum); }
.feature[aria-pressed=true] { background: var(--plum); color: white; border-color: var(--plum); }
.feature:disabled { cursor: default; }
.home-result-link { display: inline-flex; align-items: center; gap: .7rem; margin-top: clamp(20px, 3vw, 40px); font-weight: 600; font-size: .93rem; }
.match-faces { display: flex; flex: none; }
.match-faces img { width: 40px; height: 40px; border: 2px solid var(--paper); object-fit: cover; border-radius: 50%; }
.match-faces img + img { margin-left: -10px; }
.home-library { padding-block: clamp(24px, 3vw, 44px); background: #ece8e2; border-block: 1px solid var(--line); }
.library-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.strip-control { min-height: 44px; border-radius: 24px; border: 1px solid #bdb3ad; padding: .4rem 1rem; background: transparent; color: var(--plum); font-weight: 600; font-size: .9rem; }
.strip-control:hover { background: var(--light); }
.library-window { overflow-x: auto; scrollbar-width: none; }
.library-window::-webkit-scrollbar { display: none; }
.library-window:focus-visible { outline-offset: -3px; }
.library-track { display: flex; width: max-content; }
.library-set { --tile-gap: clamp(8px, .85vw, 14px); display: flex; list-style: none; gap: var(--tile-gap); margin: 0; padding: 0 var(--tile-gap) 0 0; }
.library-tile {
  width: clamp(116px, 12.5vw, 202px); aspect-ratio: 288 / 320; border-radius: 10px;
  background: #d4cabb url('/assets/library-preview.webp') no-repeat; background-size: 1200% 100%;
  background-position: calc(var(--tile) * 100% / 11) center;
}
.library-tile:has(img) { background-image: none; }
.library-tile { position: relative; }
.library-tile img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 44%; border-radius: inherit; }
@media (scripting: enabled) {
  .library-window:not([data-ready]) .library-tile { background-image: none; background-color: #dfd9d2; }
  .library-heading .strip-control[hidden] { display: inline-block !important; visibility: hidden; }
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .library-window[data-ready] .library-track { animation: portraits-appear .24s ease-out; }
  @keyframes portraits-appear { from { opacity: .35; } to { opacity: 1; } }
}
@media (min-width: 901px) {
  body:has(.home-hero) .nav-shell { min-height: clamp(52px, 6vh, 75px); }
  .home-hero { padding-block: clamp(14px, 2.4vh, 40px); }
  .home-explorer { width: min(100%, max(455px, 49vh)); justify-self: center; }
  .home-title { font-size: clamp(3.3rem, min(6.15vw, 9vh), 6.95rem); }
  .home-explorer > h2, .library-heading h2 { font-size: clamp(1.8rem, 3.6vh, 2.7rem); }
  .rating-intro { margin-block: 5px 10px; }
  .example-caption { min-height: 0; padding: 10px 16px; }
  .example-caption h3 { font-size: clamp(1.35rem, 2.5vh, 1.9rem); }
  .example-caption p { margin-top: 4px; }
  .home-library { padding-block: clamp(12px, 1.8vh, 28px); }
  .library-heading { margin-bottom: 10px; }
  .library-heading p { margin-top: 3px; }
  .library-tile { width: clamp(108px, 15.5vh, 202px); }
}
@media (min-width: 901px) and (max-height: 1160px) {
  .home-hero { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .home-explorer { width: 100%; }
  .home-explorer .portrait-panel { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; }
  .home-lead { margin-top: 14px; max-width: 39ch; font-size: 1.08rem; }
  .home-actions, .home-result-link { margin-top: 16px; }
  .home-private { margin-top: 8px; }
}
@media (min-width: 901px) and (max-height: 800px) {
  .home-hero { padding-block: 12px; column-gap: 24px; }
  .home-explorer .portrait-panel { grid-template-columns: 1fr 1.1fr; }
  .example-caption { padding: 8px 12px; }
  .example-caption p { font-size: .9rem; line-height: 1.35; }
  .feature { min-height: 34px; padding-right: 7px; gap: 4px; }
  .feature-thumb { width: 23px; height: 23px; }
  .library-heading { flex-wrap: nowrap; align-items: center; }
  .library-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 16px; }
  .strip-control { flex: none; }
  .home-library { padding-block: 10px; }
}
@media (min-width: 901px) and (max-height: 665px) {
  .home-explorer .portrait-panel { grid-template-columns: minmax(0, min(47%, 48vh)) 1fr; }
  .home-lead { margin-top: 8px; max-width: none; font-size: 1rem; line-height: 1.4; }
  .home-actions, .home-result-link { margin-top: 10px; }
  .home-hero { padding-block: 8px; }
}
.match-example { max-width: 880px; padding-block: clamp(32px, 6vw, 75px); }
.match-intro { margin-bottom: clamp(26px, 3.5vw, 44px); }
.match-intro .page-title { max-width: 29ch; font-size: clamp(2.55rem, 4.8vw, 4rem); }
.match-intro .page-intro { max-width: 60ch; margin-top: 1rem; }
.match-plate {
  padding-block: 16px 20px; border-block: 1px solid var(--line);
  line-height: 1.4;
}
.match-plate input { margin: 0 .35em 0 0; width: 1rem; height: 1rem; vertical-align: middle; accent-color: var(--plum); }
.match-plate label { font-size: .95rem; font-weight: 600; vertical-align: middle; cursor: pointer; padding-block: .4rem; }
.match-triptych { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 22px); margin-top: 14px; }
.match-triptych svg { display: block; width: 100%; height: auto; aspect-ratio: .87; border-radius: 8px; background: var(--line); }
.match-triptych figcaption { margin-top: .55rem; }
.match-triptych figcaption strong, .match-triptych figcaption span { display: block; }
.match-triptych figcaption span { color: var(--muted); font-size: .875rem; }
.match-trace path { fill: none; stroke: #fff4cf; stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px #312638); }
#example-outlines:not(:checked) ~ .match-triptych .match-trace { visibility: hidden; }
.match-story { margin: clamp(25px, 4vw, 45px) auto 0; }
.match-story h2 { margin-bottom: .6rem; }
.match-story section + section { margin-top: 2rem; }
.match-record { margin-top: 1.6rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 540px) {
  .match-triptych { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .match-triptych figure:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; align-items: center; }
  .match-triptych figure:first-child figcaption { margin-top: 0; }
}
@media (max-width: 880px) {
  .home-hero { gap: 25px; }
  .home-title { font-size: clamp(2.8rem, 5.95vw, 4.25rem); }
  .home-lead { margin-top: 19px; }
  .example-caption { min-height: 136px; padding: 17px; }
}
@media (max-width: 700px) {
  .nav-shell { min-height: 63px; }
  .brand { font-size: 24px; }
  .brand img { width: 25px; height: 25px; }
  .home-hero { grid-template-columns: 1fr; gap: 27px; padding-block: 34px 28px; }
  .home-title { font-size: clamp(2.85rem, 10.5vw, 5rem); }
  .home-lead { max-width: 39ch; margin-top: 16px; }
  .home-actions { margin-top: 19px; }
  .home-private { margin-top: 10px; }
  .example-caption { min-height: 111px; }
}
@media (max-width: 450px) {
  .nav-shell { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 5px; }
  .brand { min-height: 44px; }
  .site-nav { gap: 24px; }
}

.home-intro { display: flex; flex-direction: column; align-items: flex-start; }
.home-match-art {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1%;
  width: 200px;
  max-width: 90%;
  aspect-ratio: 2;
  margin: 12px 0 2px;
}
.home-match-art img {
  width: 39%;
  height: 88%;
  object-fit: cover;
  border: 2px solid white;
  border-radius: 6px;
  box-shadow: 0 4px 7px -3px #3d2d3760, 0 10px 20px -12px #3d2d376b;
  transform: rotate(-7deg);
}
.home-match-art img + img { transform: rotate(7deg); }
.home-match-art span {
  position: absolute;
  top: 89%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 3px 9px 4px;
  border: 1px solid #fff8ee;
  border-radius: 20px;
  background: var(--plum);
  color: #fffaf5;
  font: 650 10px/1.2 var(--body);
  white-space: nowrap;
  box-shadow: 0 2px 5px #44303d33;
}
.home-intro .home-lead { margin-top: 12px; }
.home-explorer .home-result-link { display: none; }

@media (max-width: 700px) {
  .homepage .nav-shell { min-height: 54px; flex-direction: row; align-items: center; gap: 10px; padding: 0; }
  .homepage .brand { font-size: 21px; }
  .homepage .brand img { width: 21px; height: 21px; margin-right: 4px; }
  .homepage .site-nav { gap: 13px; }
  .homepage .site-nav a { font-size: 13px; }
  .home-hero { padding: 19px 0 24px; gap: 20px; }
  .home-title { font-size: clamp(38px, 11vw, 48px); line-height: .94; }
  .home-match-art { width: min(71%, 246px); align-self: center; margin: 13px 0 4px; }
  .home-match-art span { font-size: clamp(10px, 3vw, 12px); }
  .home-lead { font-size: 16px; line-height: 1.42; }
  .home-actions { margin-top: 14px; }
  .home-actions a { min-height: 44px; padding: 9px 14px; }
  .home-private { font-size: 12px; margin-top: 7px; }
  .home-explorer > h2 { font-size: 26px; }
  .rating-intro { font-size: 14px; }
  .home-intro .home-result-link { display: none; }
  .home-explorer .home-result-link { display: inline-flex; margin-top: 14px; }
}

/* Short desktop windows share a row for the example and its introduction. */
@media (min-width: 901px) and (max-height: 850px) {
  .home-intro { display: grid; grid-template-columns: minmax(98px, 30%) 1fr; column-gap: 12px; align-items: center; }
  .home-intro > :not(.home-match-art, .home-lead) { grid-column: 1 / -1; justify-self: start; }
  .home-match-art { width: 100%; max-width: 175px; margin: 10px 0 0; }
  .home-intro .home-lead { margin-top: 10px; }
}
@media (min-width: 901px) and (max-height: 665px) {
  .home-intro { grid-template-columns: minmax(100px, 24%) 1fr; }
  .home-match-art, .home-intro .home-lead { margin-top: 6px; }
}
