html {
    font-size: 1.4rem;
    font-family: "Crimson Text", Palatino, serif;
    text-rendering: optimizeLegibility;
}

body {
    max-width: 770px;
    margin: 4em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Source Sans Pro", sans-serif;
    font-weight: 700;
}

p {
    line-height: 1.6rem;
    margin-top: 1rem;
    hyphens: auto;
}

h1 {
    font-size: 1.2rem;
    line-height: 1.4rem;
    margin-top: 1rem;
}
h2 {
    font-size: 1rem;
    line-height: 1.2rem;
    margin-top: 1rem;
}
h4 {
    font-size: 1.0rem;
    line-height: 1.0rem;
}
span.paragraph {
    font-weight: 700;
    margin-right: 1em;
    line-height: 1.2rem;
}

ul {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

a {
    color: #0365C0;
}
a:hover {
    color: #0A4C8B;
}

/* header */
h1.title {
    font-size: 1.4rem;
}
ul.authors {
    list-style: none;
    padding: 0;
}
ul.authors li {
    padding: 0;
    margin: 0;
}
li.uw::after {
    content: "University of Washington";
    color: #666;
    font-size: 75%;
    margin-left: 1em;
}
li.msr::after {
    content: "Microsoft Research";
    color: #666;
    font-size: 75%;
    margin-left: 1em;   
}

/* counters */
body {
    counter-reset: section figure;
}
section {
    counter-reset: subsection;
}
h1:not(.unnumbered):before {
    content: counter(section) ". ";
    counter-increment: section;
}
h2:not(.unnumbered):before {
    content: counter(section) "." counter(subsection) ". ";
    counter-increment: subsection;
}
p.caption::before {
    content: "Figure " counter(figure) ": ";
    counter-increment: figure;
    font-weight: 700;
    line-height: 1.0rem;
}

/* figures */
div.figure, div.figure img {
    margin: 1rem auto 1rem auto;
    display: block;
    width: 100%;
    max-width: 500px;
}
div.bigfig, div.bigfig img {
    max-width: 770px;
}
div.figure img.smallfig {
    width: 65%;
    min-width: 250px;
    margin-left: auto;
    margin-right: auto;
}
p.caption {
    font-size: 90%;
    line-height: 1.3rem;
    border-top: 1px solid #666;
}
p.subcaption {
    font-size: 80%;
    line-height: 1.1rem;
    text-align: center;
}

/* citations */
.references {
    word-wrap: break-word;
}
#refbox {
    width: 400px;
    border: 1px solid black;
    background: white;
    padding: 0.5em;
    position: absolute;
    border-radius: 5px 5px;
    word-wrap: break-word;
}

/* mobile */
@media only screen and (max-device-width: 700px) {
    html {
        font-size: 1.2rem;
    }
    body {
        margin: 0.5em;
    }
    #refbox {
        display: none;
    }
}
