* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f5f2;
    color: #181818;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(900px, calc(100% - 40px));

    margin: 0 auto;
    padding: 70px 0;
}

header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 50px;
}

.eyebrow {
    margin: 0 0 10px;

    font-size: 12px;
    letter-spacing: 2px;

    opacity: 0.45;
}

h1 {
    margin: 0;

    font-size: 48px;
    font-weight: 600;

    letter-spacing: -2px;
}

button {
    border: none;

    padding: 12px 18px;

    border-radius: 8px;

    background: #181818;
    color: white;
}

button:hover {
    opacity: 0.8;
}

button.secondary {
    background: #deded8;
    color: #181818;
}

.editor {
    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-bottom: 35px;

    padding: 25px;

    background: white;

    border-radius: 14px;
}

.editor input,
.editor textarea {
    width: 100%;

    border: 1px solid #deded8;

    border-radius: 8px;

    padding: 14px;

    background: #fafaf8;

    outline: none;
}

.editor input {
    font-size: 20px;
    font-weight: 600;
}

.editor textarea {
    min-height: 150px;

    resize: vertical;
}

.editor input:focus,
.editor textarea:focus {
    border-color: #888;
}

.editor-actions {
    display: flex;

    gap: 10px;
}

.notes {
    display: flex;
    flex-direction: column;

    gap: 15px;
}

.note-card {
    background: white;

    padding: 25px;

    border-radius: 14px;
}

.note-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;
}

.note-card h2 {
    margin: 0 0 5px;

    font-size: 22px;
}

.note-card p {
    margin: 20px 0 0;

    line-height: 1.6;

    white-space: pre-wrap;
}

.date {
    font-size: 12px;

    opacity: 0.4;
}

.note-actions {
    display: flex;

    gap: 8px;
}

.note-actions button {
    padding: 8px 12px;

    background: #eeeeea;
    color: #181818;

    font-size: 13px;
}

.delete-button {
    color: #a43838 !important;
}

.empty-state,
.error {
    padding: 60px;

    text-align: center;

    opacity: 0.5;
}

.hidden {
    display: none;
}

@media (max-width: 650px) {

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    h1 {
        font-size: 38px;
    }

    .note-header {
        flex-direction: column;
    }

}
