:root {
    --ink: #171717;
    --muted: #5e5e5a;
    --paper: #f5f4ef;
    --white: #ffffff;
    --line: #d9d8d1;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: inherit;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

#container {
    min-height: 100vh;
}

#header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(23, 23, 23, 0.08);
    background: rgba(245, 244, 239, 0.95);
    backdrop-filter: blur(14px);
}

#logo img {
    width: 50px;
    height: 50px;
}

#hauptnav {
    position: absolute;
    left: max(18px, calc((100% - 820px) / 2));
    top: 50%;
    transform: translateY(-50%);
}

#hauptnav a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    text-decoration: none;
}

main {
    width: min(calc(100% - 36px), 820px);
    margin: 0 auto;
    padding: 72px 0 100px;
}

h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: -0.025em;
}

h1 {
    margin: 0 0 34px;
    font-size: clamp(2.6rem, 7vw, 4.8rem);
}

h1:not(:first-child) {
    margin-top: 86px;
}

h2 {
    margin: 56px 0 18px;
    padding-top: 10px;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

h3 {
    margin: 34px 0 12px;
    font-size: 1.18rem;
}

p,
ul,
ol {
    margin: 0 0 18px;
}

ul,
ol {
    padding-left: 24px;
}

li + li {
    margin-top: 10px;
}

.index {
    padding: 24px 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
}

.index-link {
    text-decoration: none;
}

.index-link:hover,
.index-link:focus-visible {
    text-decoration: underline;
}

main > a,
main p a,
main li a {
    text-decoration: underline;
}

.seal {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 620px) {
    #header {
        min-height: 64px;
    }

    #logo img {
        width: 44px;
        height: 44px;
    }

    #hauptnav {
        left: 12px;
    }

    #hauptnav a {
        width: 38px;
        height: 38px;
        font-size: 27px;
    }

    main {
        width: min(calc(100% - 28px), 820px);
        padding-top: 48px;
    }

    h1:not(:first-child) {
        margin-top: 64px;
    }

    h2 {
        margin-top: 44px;
    }

    .index {
        padding: 20px;
    }
}
