* {
    box-sizing: border-box;
}

:root {
    --bg: #f2f1ee;
    --text: #212121;
    --spoiler: #918f89;
    --spoiler-hover: #85837c;
    --spoiler-transparent: #918f891f;
    --spoiler-transparent-hover: #918f8939;
    --link: #833834;
    --link-hover: #cb605a;
    --btn: #D6CDC6;
    --btn-hover: #D6C8BF;
    --btn-active: #CCBEB5;
    --author-tag: #e6e5e2;
    --quote-border: #d26d68;
    --quote-bg: #e4dbda;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Outfit", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
}

pre {   /* for comments */
    white-space: pre-wrap;       /* Since CSS 2.1 */
    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

button, input, textarea, pre {
    font-family: "Outfit", sans-serif;
    color: var(--text);
}

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

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

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

i {
    margin-right: 2px;
}

.header i {
    margin-right: 5px;
}

.spoiler {
    cursor: pointer;
    background-color: var(--spoiler);
    color: var(--spoiler);
    padding: 0 3px;
}

.spoiler:hover {
    background-color: var(--spoiler-hover);
    color: var(--spoiler-hover);
}

.spoiler.active {
    background-color: var(--spoiler-transparent);
    color: var(--text);
    border: none;
}

.spoiler.active:hover {
    background-color: var(--spoiler-transparent-hover);
}

.table-of-contents {
    display: block;
    cursor: pointer;
    margin: 0;
}

.title {
    font-size: 2rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.header {
    font-size: 1.85rem;
    margin: 0;
    margin-top: 30px;
    scroll-margin-top: 80px;
}

.subheader {
    font-size: 1.25rem;
    margin: 20px 0 5px 0;
}

section {
    scroll-margin-top: 80px;
}

.details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.quote {
    border-left: 5px solid var(--quote-border);
    background-color: var(--quote-bg);
    padding-left: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0 10px 15px;
}

.big-quote {
    font-size: 3.5rem;
    margin: 0;
    margin-top: -5px;
    color: var(--quote-border);
}

.quote-text {
    flex-grow: 1;
    margin: 0;
    padding: 15px 20px 15px 0;
}

.dropdown {
    margin-bottom: 30px;
}

.dropdown-summary {
    cursor: pointer;
}

.dropdown-text {
    margin: 5px 0;
}

#full-logo-container {
    width: 100%;
    margin-top: 60px;
}

#full-logo-link {
    width: 100%;
    display: flex;
    justify-content: center;
}

#full-logo {
    width: 60%;
}

hr {
    width: calc(100% + 20px);
    margin-left: -10px;
    height: 2px;
}

.author {
    display: flex;
    gap: 7px;
    align-items: center;
}

.author-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.author-name, .date {
    font-size: 1.1rem;
    margin: 0;
}

.content-img {
    width: 100%;
    margin: 10px 0 5px 0;
}

.content-text {
    margin: 15px 0;
}

.comment {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.comment.reply {        /* indent for replies */
    margin-left: 20px;
    width: calc(100% - 20px);
}

.comment p {
    margin: 0;
}

.comment-left {
    display: flex;
    align-items: flex-start;
}

.comment-left img {
    width: 40px;
    height: 40px;
}

.comment-right {
    flex-grow: 1;
    overflow: hidden;
}

.comment-name {
    word-wrap: break-word;
}

.delete-div {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.delete-button {
    visibility: hidden;
}

.delete-button.active {
    visibility: visible;
}

.name-div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.author-tag {
    border: 1px solid var(--text);
    border-radius: 5px;
    font-size: 0.65rem;
    padding: 1px 4px;
    background-color: var(--author-tag);
}

.author-tag.hidden {
    visibility: hidden;
}

.reply-div {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-top: 3px;
}

.delete-button,
.reply-button,
#cancel-btn {
    cursor: pointer;
    font-size: 0.75rem;
    border: none;
    background-color: transparent;
}

.delete-button:hover,
.reply-button:hover,
#cancel-btn:hover {
    color: var(--link-hover);
}

.delete-button:active,
.reply-button:active,
#cancel-btn:active {
    color: var(--link);
}

.comment.reply .reply-button {
    visibility: hidden;
}

.comment-right hr {
    width: 100%;
    margin: 0;
}

.comment-text {
    width: 100%;
    margin: 5px 0;
    word-wrap: normal;
}

#text {
    height: 10rem;
    margin-bottom: 10px;
}

#comments-form {
    margin-top: 30px;
}

#comments-form.reply {
    margin: 20px 0 40px 23px;
}

#input-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

#input-header {
    font-size: 1.4rem;
    font-weight: 400;
    margin: 0 0 3px 0;
}

#cancel-btn {
    visibility: hidden;
}

#comments-form.reply #cancel-btn {
    visibility: visible;
}

#comments-form p {
    margin: 0;
    font-size: 0.9rem;
}

#name-email-container {
    display: flex;
    flex-direction: column;
}

.input-container {
    margin: 15px 0 0 0;
}

.input-container input,
.input-container textarea {
    width: 100%;
    margin-top: 2px;
    border: 1px solid var(--text);
    font-size: 1rem;
}

.input-container label {
    font-weight: 300;
}

#name, #email {
    margin-bottom: 5px;
    height: 2rem;
}

#submit-container input {
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 300;
    padding: 7px 12px;
    background-color: var(--btn);
    color: var(--text);
    border: none;
    margin-bottom: 20px;
}

#submit-container input:hover {
    background-color: var(--btn-hover);
}

#submit-container input:active {
    background-color: var(--btn-active);
}

@media screen and (min-width: 768px) {
    body {
        font-size: 1.5rem;
        padding: 40px;
    }

    .title {
        font-size: 3rem;
        margin-top: 50px;
    }

    #full-logo {
        width: 55%;
    }

    hr {
        width: calc(100% + 40px);
        margin-left: -20px;
    }

    .header {
        font-size: 2.5rem;
        margin-top: 40px;
        scroll-margin-top: 120px;
    }
    
    .subheader {
        font-size: 2rem;
        margin-top: 30px;
    }

    section {
        scroll-margin-top: 120px;
    }

    .author {
        gap: 12px;
    }

    .author-img {
        width: 40px;
        height: 40px;
    }

    .author-name, .date {
        font-size: 1.5rem;
    }

    .content-img {
        margin-bottom: 10px;
    }
}

@media screen and (min-width: 1024px) {
    body {
        font-size: 1.15rem;
        padding: 10vw;
        padding-top: 60px;
    }

    .title {
        font-size: 2.3rem;
        margin-top: 40px;
    }

    #full-logo-container {
        margin-top: 30px;
    }

    #full-logo {
        width: 40%;
    }

    hr {
        width: 90vw;
        margin-left: -5vw;
    }

    .header {
        font-size: 2.05rem;
        margin-top: 40px;
        scroll-margin-top: 90px;
    }
    
    .subheader {
        font-size: 1.4rem;
        margin-top: 30px;
    }

    section {
        scroll-margin-top: 90px;
    }

    .author {
        gap: 7px;
    }

    .author-img {
        width: 35px;
        height: 35px;
    }

    .author-name, .date {
        font-size: 1.2rem;
    }

    .content-img {
        margin-bottom: 5px;
    }

    #name-email-container {
        flex-direction: row;
        gap: 20px;
    }

    #name-container,
    #email-container {
        flex-grow: 1;
    }
}
