* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #202124;
}

.container{
    width: min(900px, 90%);
    margin: 50px auto;
}

header {
    margin-bottom: 30px;
}

.editor {
    display: flex;
    flex-direction: column;
    gap: 12px;

    background: white;
    padding: 25px;

    border-radius: 12px;
}

input,
textarea {
    width: 100%;
    padding: 12px;

    border: 1px solid #ccc;
    border-radius: 8px;

    font: inherit;
}

textarea {
    min-height: 300px;
    resize:vertical;
}

button {
    padding: 12px 18px;

    border: none;
    border-radius: 8px;

    font: inherit;
    font-weight: bold;

    cursor: pointer;
}

.study-document {
    margin-top: 30px;

    background: white;
    padding: 30px;

    border-radius: 12px;
}

.study-block {
    margin-top: 2.5rem;
}

.study-block h2 {
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

p {
    line-height: 1.6;
}

.main-nav {
    display: flex;
    gap: 25px;

    padding:20px 5%;
    background: white;
    border-bottom: 1px solid #ddd;
}

.main-nav a {
    color: #202124;
    text-decoration: none;
    font-weight: 600;
}

.main-nav a:hover {
    text-decoration: underline;
}

.subject-section {
    margin-top: 40px;
}

.document-card {
    display: block;
    margin: 12px 0;
    padding: 18px;
    background: white;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.document-card:hover {
    transform: translateY(-2px);
}

.document-card h3 {
    margin-top: 0;
}

details {
    margin: 15px 0;
    padding: 15px;
    background: #f5f6f8;
    border-radius: 8px;
}

summary {
    cursor: pointer;
    font-weight: 600;
}

#documentText {
    max-width: 850px;
    line-height: 1.75;
    font-size: 1.05rem;
}

#documentText {
    margin: 0 0 1.25rem;
}

.katex-display {
    margin: 1.5rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0;
}

