@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap");

:root {
    --bg: #fbf8ef;
    --card: #ffffff;
    --text: #20201e;
    --muted: #3d3c38;
    --line: rgba(32, 32, 30, 0.12);
    --accent: #ffe450;
    --ink: #20201e;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.45 Nunito, system-ui, sans-serif;
}

.card {
    width: min(100%, 24rem);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 1.35rem 1.4rem 1.45rem;
}

.feed {
    width: min(100%, 36rem);
}

body:has(.feed) {
    justify-content: flex-start;
    padding-top: 2rem;
}

h1,
h2 {
    margin: 0 0 0.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 1.65rem;
}

h2 {
    margin-top: 0.25rem;
    font-size: 1.15rem;
}

p {
    margin: 0 0 1rem;
    color: var(--muted);
}

.links {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.links a {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

.field {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 0.9rem;
}

label {
    font-size: 0.9rem;
    font-weight: 700;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
    border: 0;
}

.choice {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

input,
textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(32, 32, 30, 0.22);
    border-radius: 16px;
    font: inherit;
    color: var(--ink);
    background: #ffffff;
}

textarea {
    min-height: 6rem;
    resize: vertical;
}

::placeholder {
    color: #6f6c64;
}

button {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    font: inherit;
    font-size: 1.06rem;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    filter: brightness(0.97);
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.message {
    margin: 0 0 0.75rem;
}

.message.ok {
    color: var(--ink);
    font-weight: 800;
}

.message.err {
    color: var(--ink);
    font-weight: 700;
    background: var(--accent);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
}

.composer {
    margin-bottom: 0.5rem;
}

.tweets {
    margin-top: 0.5rem;
}

.person {
    padding: 0.9rem 0 0.35rem;
    border-top: 1px solid var(--line);
}

a.person-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    color: var(--text);
    text-decoration: none;
}

a.person-head:hover {
    text-decoration: none;
}

a.person-head:hover .who {
    text-decoration: underline;
}

.avatar.mini {
    width: 48px;
    height: 48px;
    margin: 0;
    flex: none;
}

.person .who {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}

.person .who span {
    margin-left: 0.35rem;
    color: var(--muted);
    font-weight: 600;
}

.person .quiet {
    margin: 0 0 0.55rem 3.75rem;
}

.feed .tweet {
    margin: 0;
    padding: 0.9rem 0 0.35rem;
    border-top: 1px solid var(--line);
}

.feed .tweet .text,
.feed .tweet .when,
.feed .tweet-actions,
.feed .tweet-edit {
    margin-left: 3.75rem;
}

.tweet-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.35rem;
}

.tweet-actions form {
    margin: 0;
}

.tweet-actions button {
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 800;
}

.tweet-actions button:hover {
    filter: none;
    text-decoration: underline;
}

.tweet-edit textarea {
    min-height: 4.5rem;
    margin-bottom: 0.55rem;
}

.tweet-edit a {
    display: inline-block;
    margin-top: 0.45rem;
}

.profile .tweet {
    margin: 0;
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
}

.tweet .who,
.tweet .text,
.tweet .when {
    margin: 0;
}

.tweet .who {
    margin-bottom: 0.3rem;
    color: var(--text);
    font-weight: 800;
}

.tweet .who span {
    margin-left: 0.35rem;
    color: var(--muted);
    font-weight: 600;
}

.tweet .text {
    margin-bottom: 0.35rem;
    color: var(--text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tweet .when {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.actions {
    margin: 0.85rem 0 0;
}

.avatar {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 0 0.85rem;
    border-radius: 50%;
    object-fit: cover;
}

.profile {
    text-align: center;
}

.profile .avatar,
.avatar-lg {
    width: 128px;
    height: 128px;
    margin-right: auto;
    margin-left: auto;
}

.profile .tweets,
.profile .actions {
    text-align: left;
}

a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 800;
}

.topbar h1 {
    margin: 0;
}

.topbar .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem 0.9rem;
}

.side-links {
    position: static;
    width: auto;
}

body.users {
    display: block;
}

.users-card {
    width: min(100%, 72rem);
    margin: 0 auto;
    overflow-x: auto;
}

.users-card table {
    width: 100%;
    border-collapse: collapse;
}

.users-card th,
.users-card td {
    border-bottom: 1px solid var(--line);
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.users-card th {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 860px) {
    body {
        justify-content: flex-start;
        padding-top: 1.25rem;
    }

    body.home {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
