.notes-page {
    width: 100%;
    max-width: 48rem;
    margin-inline: auto;
}

.notes-header {
    padding-block: clamp(1rem, 3vw, 2rem) clamp(2.75rem, 5vw, 4.25rem);
    border-bottom: 1px solid var(--sv2-rule);
}

.notes-eyebrow {
    margin: 0 0 0.75rem;
    color: var(--sv2-denim);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.notes-header h1,
.note-header h1 {
    margin: 0;
    font-family: var(--sv2-display);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 1;
}

.notes-header h1 {
    font-size: clamp(3rem, 5vw, 4.75rem);
}

.notes-intro {
    max-width: 39rem;
    margin: 1.5rem 0 0;
    color: var(--sv2-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.notes-header a,
.notes-empty a,
.note-breadcrumb a,
.note-meta a,
.note-content a {
    color: var(--sv2-denim);
}

.notes-actor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--sv2-rule);
    border-bottom: 1px solid var(--sv2-rule);
}

.notes-actor__avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
    background: var(--sv2-paper-deep);
}

.notes-actor__identity {
    min-width: 0;
}

.notes-actor__identity strong,
.notes-actor__identity span {
    display: block;
}

.notes-actor__identity strong {
    color: var(--sv2-ink);
    font-family: var(--sv2-display);
    font-size: 1.2rem;
    font-weight: 500;
}

.notes-actor__identity span {
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
    color: var(--sv2-muted);
    font-size: 0.82rem;
}

.notes-follow-button,
.notes-follow-form button {
    border: 1px solid var(--sv2-denim);
    background: var(--sv2-denim);
    color: white;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.notes-follow-button {
    min-width: 6.25rem;
    padding: 0.7rem 1rem;
}

.notes-follow-button:hover,
.notes-follow-form button:hover {
    background: var(--sv2-ink);
    border-color: var(--sv2-ink);
}

.notes-federation-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.3rem;
    padding-top: 1rem;
    color: var(--sv2-muted);
    font-size: 0.76rem;
}

.notes-federation-stats strong {
    color: var(--sv2-ink);
    font-variant-numeric: tabular-nums;
}

.notes-feed {
    margin: 0;
    padding: 0;
    list-style: none;
}

.notes-feed > li {
    border-bottom: 1px solid var(--sv2-rule);
}

.note-card {
    padding-block: clamp(2rem, 4vw, 3rem);
}

.note-content {
    color: var(--sv2-ink);
    font-size: 1rem;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.note-content > :first-child {
    margin-top: 0;
}

.note-content > :last-child {
    margin-bottom: 0;
}

.note-content p,
.note-content ul,
.note-content ol,
.note-content blockquote,
.note-content pre {
    margin-block: 0 1.25rem;
}

.note-content ul,
.note-content ol {
    padding-left: 1.4rem;
}

.note-content blockquote {
    padding-left: 1rem;
    border-left: 2px solid var(--sv2-pale-blue);
    color: var(--sv2-muted);
}

.note-content pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem;
    background: var(--sv2-paper-deep);
    font-size: 0.84rem;
    line-height: 1.65;
}

.note-content :not(pre) > code {
    padding: 0.12rem 0.28rem;
    background: var(--sv2-paper-deep);
    font-size: 0.88em;
}

.note-meta {
    margin-top: 1.4rem;
}

.note-meta a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    font-size: 0.76rem;
    font-weight: 650;
    text-decoration: none;
}

.note-meta a:hover,
.note-breadcrumb a:hover,
.notes-empty a:hover {
    color: var(--sv2-ink);
}

.note-meta span,
.note-breadcrumb span:first-child,
.notes-empty a span {
    color: var(--sv2-apricot);
}

.notes-empty {
    padding-block: 2.5rem;
}

.notes-empty p {
    margin: 0 0 0.75rem;
    color: var(--sv2-muted);
}

.notes-empty a {
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

.notes-follow-dialog {
    width: min(32rem, calc(100vw - 2rem));
    margin: auto;
    padding: 1.5rem;
    border: 1px solid var(--sv2-rule);
    background: var(--sv2-paper);
    color: var(--sv2-ink);
    box-shadow: 0 1.5rem 4rem rgb(17 37 58 / 18%);
}

.notes-follow-dialog::backdrop {
    background: rgb(17 37 58 / 42%);
}

.notes-follow-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.notes-follow-dialog__head h2 {
    margin: 0;
    font-family: var(--sv2-display);
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.notes-follow-dialog__head .notes-eyebrow {
    margin-bottom: 0.4rem;
}

.notes-follow-dialog > p {
    color: var(--sv2-muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

.notes-follow-dialog__close {
    padding: 0.1rem 0.25rem;
    border: 0;
    background: transparent;
    color: var(--sv2-muted);
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.notes-follow-form {
    margin-top: 1.25rem;
}

.notes-follow-form label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--sv2-ink);
    font-size: 0.76rem;
    font-weight: 700;
}

.notes-follow-form__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.notes-follow-form input {
    min-width: 0;
    padding: 0.72rem 0.8rem;
    border: 1px solid var(--sv2-rule);
    border-right: 0;
    background: var(--sv2-paper);
    color: var(--sv2-ink);
    font: inherit;
    font-size: 0.86rem;
}

.notes-follow-form input:focus {
    outline: 2px solid var(--sv2-pale-blue);
    outline-offset: 1px;
}

.notes-follow-form button {
    padding: 0.72rem 1rem;
}

.notes-follow-dialog__status {
    padding: 0.75rem;
    border-left: 2px solid var(--sv2-denim);
    background: var(--sv2-paper-deep);
}

.notes-follow-dialog__status--error {
    border-left-color: var(--sv2-apricot);
}

.notes-follow-dialog__fallback code,
.notes-follow-dialog__status code {
    overflow-wrap: anywhere;
}

.note-page {
    width: 100%;
    max-width: 46rem;
    margin-inline: auto;
}

.note-breadcrumb {
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.note-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

.note-header {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--sv2-rule);
}

.note-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.note-content--permalink {
    padding-top: 2rem;
    font-size: 1.04rem;
    line-height: 1.9;
}

@media (max-width: 600px) {
    .notes-header {
        padding-bottom: 2.5rem;
    }

    .notes-actor {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .notes-follow-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .note-card {
        padding-block: 1.75rem;
    }

    .notes-follow-form__row {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .notes-follow-form input {
        border-right: 1px solid var(--sv2-rule);
    }
}
