.notepad-page {
    padding: 0;
}

.notepad-window {
    width: min(640px, 100%);
    border: 2px solid #000;
    background: #fff;
    box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #000, 2px 2px 0 #000;
}

.notepad-titlebar {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    border-bottom: 2px solid #000;
    background: #e6e6e6;
}

.notepad-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.notepad-paper {
    position: relative;
    padding: 18px 20px 36px;
    min-height: 360px;
    background: #fff;
}

.notepad-paper--window {
    width: 100%;
    min-height: 480px;
}

.notepad-paper::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background:
        linear-gradient(#000, #000),
        linear-gradient(#000, #000),
        linear-gradient(#000, #000);
    background-size: 100% 1px, 100% 1px, 100% 1px;
    background-position: 0 100%, 0 calc(100% - 2px), 0 calc(100% - 4px);
    background-repeat: no-repeat;
    z-index: 4;
}

.notepad-content p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.notepad-content p:last-child {
    margin-bottom: 0;
}

.notepad-divider {
    margin: 16px 0 !important;
    font-family: monospace;
    letter-spacing: 0;
    color: #000;
}

.notepad-content a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.notepad-content a:hover,
.notepad-content a:focus {
    text-decoration: none;
    background: #000;
    color: #fff;
}

.notepad-page-content {
    display: none;
}

.notepad-page-content.is-active {
    display: block;
}

.notepad-error {
    color: #c62828;
}

.notepad-dog-ear {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 10%;
    aspect-ratio: 1 / 1;
    min-width: 26px;
    max-width: 70px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 3;
    overflow: hidden;
}

.notepad-dog-ear.hidden {
    display: none;
}

.notepad-dog-ear::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    clip-path: polygon(0 100%, 100% 100%, 0 0);
}

.notepad-dog-ear::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 200%;
    height: 2px;
    background: #000;
    transform: rotate(45deg);
    transform-origin: left top;
    z-index: 2;
}

.notepad-dog-ear:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.notepad-page-number {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    z-index: 5;
}
