* {
    box-sizing: border-box;
}

:root {
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;

    color: #202124;
    background: #f7f7f5;
}

body {
    margin: 0;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
}

.sidebar {
    padding: 28px 20px;
    border-right: 1px solid #e5e5e1;
    background: #fbfbfa;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #202124;
    color: white;
    font-weight: 700;
}

.brand span {
    display: block;
    margin-top: 2px;
    color: #888;
    font-size: 12px;
}

.new-note {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: #202124;
    color: white;
    padding: 11px 14px;
    font-weight: 600;
}

nav {
    margin-top: 24px;
}

nav a {
    display: block;
    padding: 10px 12px;
    margin-bottom: 4px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
}

nav a.active,
nav a:hover {
    background: #eeeeeb;
    color: #202124;
}

.sidebar-section {
    margin-top: 40px;
}

.section-label,
.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    color: #999;
}

.side-stat {
    display: flex;
    justify-content: space-between;
    padding: 9px 2px;
    color: #777;
    font-size: 14px;
}

main {
    min-width: 0;
}

.topbar {
    max-width: 1100px;
    margin: auto;
    padding: 48px 40px 24px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: end;
}

h1 {
    margin: 7px 0 0;
    font-size: 32px;
    letter-spacing: -.04em;
}

h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.02em;
}

p {
    color: #888;
}

.search {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e5e5e1;
    border-radius: 9px;
    padding: 0 10px 0 14px;
    width: 280px;
}

.search input {
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px 0;
    width: 100%;
}

.search span {
    color: #aaa;
    font-size: 11px;
}

.content {
    max-width: 1100px;
    margin: auto;
    padding: 20px 40px 60px;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes-header p,
.tasks-header p {
    margin-top: 5px;
    font-size: 13px;
}

.small-button {
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.note-card {
    position: relative;
    min-height: 190px;
    background: white;
    border: 1px solid #e7e7e3;
    border-radius: 12px;
    transition: .15s ease;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,.05);
}

.note-card.pinned {
    border-color: #cfcfc8;
}

.note-link {
    display: block;
    padding: 22px;
    text-decoration: none;
    color: inherit;
}

.note-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.note-card p {
    margin: 0;
    line-height: 1.55;
    font-size: 13px;
}

.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pin {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
}

.icon-button {
    border: 0;
    background: transparent;
    color: #888;
    font-size: 17px;
}

.tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.tags span {
    background: #f0f0ed;
    color: #777;
    border-radius: 5px;
    padding: 4px 7px;
    font-size: 10px;
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    border: 1px dashed #ddd;
    border-radius: 12px;
}

.empty-icon {
    font-size: 32px;
}

.tasks {
    margin-top: 55px;
    max-width: 650px;
}

.task-create {
    display: flex;
    margin-top: 15px;
    background: white;
    border: 1px solid #e3e3df;
    border-radius: 9px;
}

.task-create input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 12px;
    background: transparent;
}

.task-create button {
    width: 44px;
    border: 0;
    background: transparent;
}

.task {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    border: 0;
    border-bottom: 1px solid #e8e8e4;
    background: transparent;
    text-align: left;
}

.checkbox {
    width: 19px;
    height: 19px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: white;
}

.task.completed span {
    color: #aaa;
    text-decoration: line-through;
}

.no-tasks {
    padding: 20px 0;
    color: #aaa;
    font-size: 13px;
}


/* Editor */

.editor {
    min-height: 100vh;
    background: #fff;
}

.editor-top {
    height: 62px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.back {
    color: #666;
    text-decoration: none;
}

#save-status {
    color: #999;
    font-size: 12px;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.editor-actions button {
    border: 1px solid #e4e4e1;
    background: white;
    border-radius: 7px;
    padding: 7px 10px;
}

.editor-main {
    max-width: 850px;
    margin: auto;
    padding: 70px 30px;
}

.title-input {
    width: 100%;
    border: 0;
    outline: 0;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -.045em;
}

.tags-input {
    width: 100%;
    border: 0;
    outline: 0;
    margin-top: 12px;
    color: #999;
}

.content-input {
    width: 100%;
    min-height: 60vh;
    margin-top: 30px;
    resize: vertical;
    border: 0;
    outline: 0;
    font-size: 17px;
    line-height: 1.8;
}

@media (max-width: 800px) {

    .app {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .topbar,
    .content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .topbar {
        display: block;
    }

    .search {
        width: 100%;
        margin-top: 20px;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }

    .title-input {
        font-size: 32px;
    }
}
