/* Mirrai — "arXiv / NeurIPS preprint" academic paper style.
   Shared by index.html and privacy.html. */

:root {
    --ink: #1a1a1a;
    --muted: #555;
    --faint: #9a9a9a;
    --rule: #d9d9d9;
    --link: #1a4d8f;          /* hyperref-style scholarly blue */
    --serif: "Computer Modern Serif", Georgia, "Times New Roman", Times, serif;
    --content-width: 700px;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* ---- Paper column ---- */

.paper {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 4.5rem 1.5rem 2rem;
    box-sizing: border-box;
    counter-reset: section;
}

/* ---- Title block ---- */

.logo {
    display: block;
    height: 44px;
    width: auto;
    margin: 0 auto 1.25rem;
}

h1 {
    margin: 0 0 1rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.authors {
    margin: 0 0 0.25rem;
    text-align: center;
    font-size: 1.15rem;
    text-indent: 0;
}

.affiliation {
    margin: 0 0 2.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--muted);
    text-indent: 0;
}

.affiliation a {
    color: inherit;
}

/* ---- Abstract ---- */

.abstract {
    max-width: 88%;
    margin: 0 auto 2.5rem;
}

.abstract p {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    text-indent: 0;
}

/* ---- Numbered sections (CSS counters, LaTeX-style) ---- */

h2 {
    counter-reset: subsection;
    counter-increment: section;
    margin: 2rem 0 0.6rem;
    font-size: 1.3rem;
    font-weight: 700;
}

h2::before {
    content: counter(section) "\00a0\00a0";
}

h3 {
    counter-reset: subsubsection;
    counter-increment: subsection;
    margin: 1.5rem 0 0.5rem;
    font-size: 1.12rem;
    font-weight: 700;
}

h3::before {
    content: counter(section) "." counter(subsection) "\00a0\00a0";
}

h4 {
    counter-increment: subsubsection;
    margin: 1.2rem 0 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    font-style: italic;
}

h4::before {
    content: counter(section) "." counter(subsection) "." counter(subsubsection) "\00a0\00a0";
}

/* ---- Body text ---- */

p {
    margin: 0 0 0.8rem;
    text-align: justify;
    text-indent: 1.4em;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* No first-line indent right after a heading (LaTeX convention). */
h1 + p,
h2 + p,
h3 + p,
h4 + p {
    text-indent: 0;
}

ul, ol {
    margin: 0 0 0.8rem;
    padding-left: 1.6rem;
}

li {
    margin: 0.2rem 0;
}

li p {
    text-indent: 0;
    margin: 0.2rem 0;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---- Identifier stamp running up the left margin ---- */

.stamp {
    position: fixed;
    left: 0.9rem;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    transform-origin: center center;
    white-space: nowrap;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--faint);
}

/* ---- Footer (conference / preprint line) ---- */

.footer {
    flex-shrink: 0;
    width: 100%;
    max-width: var(--content-width);
    margin: 3rem auto 0;
    padding: 1rem 1.5rem 2rem;
    box-sizing: border-box;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.85rem;
}

.footer p {
    margin: 0.25rem 0;
    text-align: center;
    text-indent: 0;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
    .stamp {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }
    h1 {
        font-size: 1.6rem;
    }
    .abstract {
        max-width: 100%;
    }
    .paper {
        padding-top: 2.5rem;
    }
}
