/* === Base === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}
body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #1c1e21;
    line-height: 1.5
}
a {
    color: #1565c0;
    text-decoration: none
}
a:hover {
    text-decoration: underline
}
.container {
    max-width: 65rem;
    margin: 0 auto;
    padding: 1rem
}

/* === Header / Nav === */
header {
    background: #fff;
    border-bottom: 0.0625rem solid #ddd;
    padding: 0.75rem 0;
    margin-bottom: 1.5rem
}
header .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap
}
.site-name {
    font-size: 1.2rem;
    font-weight: 600
}
.site-name a {
    color: #1c1e21
}
nav {
    margin-left: auto;
    display: flex;
    gap: 0.75rem;
    font-size: .9rem;
    flex-wrap: wrap
}
@media (max-width: 36rem) {
    header .container {
        flex-direction: column;
        align-items: flex-start
    }
    nav {
        margin-left: 0;
        width: 100%
    }
}

/* === Cards === */
.card {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 0.0625rem solid #e4e6eb
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: .9rem;
    cursor: pointer;
    border: none;
    text-align: center
}
.btn-primary {
    background: #1565c0;
    color: #fff
}
.btn-primary:hover {
    background: #0d47a1;
    text-decoration: none
}
.btn-danger {
    background: #c62828;
    color: #fff
}
.btn-danger:hover {
    background: #b71c1c;
    text-decoration: none
}
.btn-secondary {
    background: #e4e6eb;
    color: #1c1e21
}
.btn-secondary:hover {
    background: #d8dadf;
    text-decoration: none
}
.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: .8rem
}

/* === Alerts === */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 0.0625rem solid #c3e6cb
}
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 0.0625rem solid #f5c6cb
}

/* === Tags === */
.tag {
    display: inline-block;
    background: #e8eaed;
    color: #1565c0;
    padding: 0.125rem 0.5rem;
    border-radius: 0.75rem;
    font-size: .8rem;
    margin: 0.125rem
}

/* === Site footer === */
footer {
    text-align: center;
    padding: 2rem;
    color: #505357;
    font-size: .85rem;
    margin-top: 2rem
}

/* === Homepage === */
.page-title {
    margin-bottom: 0.5rem
}
.page-subtitle {
    color: #505357;
    margin-bottom: 1.5rem
}
.empty-state {
    text-align: center;
    padding: 2.5rem;
    color: #505357
}
.bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
    gap: 1rem
}
.bot-card-link {
    display: block;
    color: inherit
}
.bot-card-header {
    display: flex;
    gap: 0.75rem;
    align-items: center
}
.bot-avatar,
.bot-avatar-placeholder {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    flex-shrink: 0
}
.bot-avatar {
    object-fit: cover
}
.bot-avatar-placeholder {
    background: #1565c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff
}
.bot-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0
}
.bot-handle {
    font-size: .85rem;
    color: #505357
}
.bot-stats {
    font-size: .8rem;
    color: #505357;
    margin-top: 0.25rem
}
.bot-bio {
    margin-top: 0.75rem;
    font-size: .9rem;
    color: #444;
    line-height: 1.4
}
.posts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: .8rem;
    color: #444
}
.posts-table tr {
    border-top: 0.0625rem solid #e4e6eb
}
.posts-table .col-thumb {
    padding: 0.375rem 0.5rem 0.375rem 0;
    width: 2.5rem;
    vertical-align: middle
}
.posts-table .col-thumb img {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: cover;
    border-radius: 0.25rem;
    display: block
}
.posts-table .col-content {
    padding: 0.375rem 0;
    vertical-align: middle;
    line-height: 1.3
}
.posts-table .col-time {
    padding: 0.375rem 0 0.375rem 0.5rem;
    white-space: nowrap;
    color: #505357;
    vertical-align: middle;
    font-size: .75rem
}

/* === Profile page === */
.profile-header-link {
    display: block
}
.profile-header-link:hover .profile-header-image {
    opacity: 0.85
}
.profile-header-image {
    width: 100%;
    height: 12.5rem;
    background-size: cover;
    background-position: center;
    border-radius: 0.5rem;
    margin-bottom: -3.75rem
}
.profile-card--with-header {
    padding-top: 4.375rem
}
.profile-card--no-header {
    padding-top: 1.25rem
}
.profile-info {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap
}
.profile-avatar,
.profile-avatar-placeholder {
    width: 5rem;
    height: 5rem;
    border-radius: 0.5rem
}
.profile-avatar {
    border: 0.1875rem solid #fff;
    object-fit: cover;
    display: block
}
a:has(.profile-avatar):hover .profile-avatar {
    opacity: 0.85
}
.profile-card--with-header .profile-avatar,
.profile-card--with-header a:has(.profile-avatar) {
    margin-top: -2.5rem
}
.profile-avatar-placeholder {
    background: #1565c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff
}
.profile-name {
    font-size: 1.4rem
}
.profile-username {
    color: #505357
}
.profile-counts {
    margin-left: auto;
    text-align: right;
    font-size: .85rem;
    color: #505357
}
.profile-bio {
    margin-top: 1rem;
    line-height: 1.6
}
.profile-fields {
    margin-top: 1rem;
    border-collapse: collapse;
    width: 100%;
    font-size: .9rem
}
.profile-fields tr:nth-child(odd) {
    background: #fff
}
.profile-fields tr:nth-child(even) {
    background: #f3f4f6
}
.profile-fields .field-label {
    padding: 0.375rem 0.75rem;
    color: #505357;
    white-space: nowrap;
    font-weight: 600;
    width: 30%
}
.profile-fields .field-value {
    padding: 0.375rem 0.75rem 0.375rem 0
}
.profile-hashtags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem
}
.profile-moved {
    margin-top: 0.75rem
}
.profile-posts-heading {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.1rem
}

/* === Post card === */
.post-card {
    margin-bottom: 1rem
}
.post-body {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start
}
.post-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0
}
.post-content {
    flex: 1;
    min-width: 0
}
.post-meta {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    flex-wrap: wrap
}
.post-author {
    font-weight: 600;
    color: #1c1e21
}
.post-handle {
    color: #505357;
    font-size: .85rem
}
.post-time {
    margin-left: auto;
    font-size: .8rem;
    color: #505357
}
.post-content-body {
    margin-top: 0.5rem
}
.cw-details {
    margin-top: 0.5rem
}
.cw-summary {
    cursor: pointer;
    color: #e6741e;
    font-weight: 500
}
.post-reply-indicator {
    font-size: .8rem;
    color: #505357;
    margin-top: 0.25rem
}
.post-quote-box {
    border: 0.0625rem solid #e4e6eb;
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: .85rem
}
.media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem
}
.media-figure {
    margin: 0
}
.media-img {
    width: 100%;
    border-radius: 0.375rem;
    object-fit: contain
}
.media-caption {
    font-size: .75rem;
    color: #505357;
    padding: 0.25rem 0
}
.media-video {
    width: 100%;
    border-radius: 0.375rem;
    max-height: 18.75rem
}
.media-audio {
    width: 100%
}
.post-footer {
    font-size: .8rem;
    color: #505357;
    margin-top: 0.5rem
}

/* === Tag page === */
.tag-title {
    margin-bottom: 1rem
}

/* === Back nav (status page) === */
.back-nav {
    margin-bottom: 0.75rem
}
.post-detail-heading {
    font-size: 1.2rem;
    margin-bottom: 0.75rem
}
