:root {
    color-scheme: light;
    --bg: #f7f1ed;
    --page: #fffdfa;
    --surface: #ffffff;
    --soft: #f5eae6;
    --soft-green: #edf3ea;
    --text: #2b2426;
    --muted: #685b60;
    --line: #ddcfca;
    --rose: #b53353;
    --rose-dark: #81263c;
    --rose-deep: #622033;
    --terracotta: #c96c55;
    --sage: #637e66;
    --cream: #fff4e5;
    --good: #286a48;
    --good-bg: #e5f4eb;
    --warn: #865610;
    --warn-bg: #fff2d2;
    --error: #962f39;
    --error-bg: #fde9ec;
    --focus: #155da5;
    --shadow: 0 18px 50px rgba(75, 45, 53, .11);
    --shadow-soft: 0 10px 28px rgba(75, 45, 53, .08);
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 7%, rgba(201, 108, 85, .13), transparent 24rem),
        radial-gradient(circle at 95% 34%, rgba(99, 126, 102, .11), transparent 26rem),
        var(--bg);
    font-size: 17px;
    line-height: 1.58;
}

a {
    color: var(--rose-dark);
}

button,
input,
select,
textarea {
    font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
}

.skip-link:focus {
    left: 8px;
    z-index: 100;
    padding: 10px 14px;
    color: var(--text);
    background: var(--page);
    border-radius: 8px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 13px 18px;
    color: #fff;
    background: linear-gradient(115deg, var(--rose-deep), var(--rose) 58%, #c64f60);
    box-shadow: 0 5px 20px rgba(74, 23, 39, .17);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.brand img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: calc(100vh - 174px);
    margin: 28px auto;
    padding: clamp(22px, 4vw, 50px);
    background: rgba(255, 253, 250, .96);
    border: 1px solid rgba(221, 207, 202, .92);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 18px 28px;
    color: var(--muted);
    font-size: .95rem;
}

.development-version {
    padding: 2px 9px;
    color: var(--rose-dark);
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 700;
}

.error-header {
    position: static;
}

.error-page-shell {
    display: grid;
    min-height: calc(100vh - 190px);
    place-items: center;
}

.error-card {
    width: min(100%, 720px);
    justify-items: center;
    padding: clamp(28px, 6vw, 58px);
    text-align: center;
}

.error-card h1,
.error-card p {
    margin-bottom: 0;
}

.error-card .actions {
    justify-content: center;
}

.error-code {
    display: inline-flex;
    padding: 5px 12px;
    color: var(--rose-dark);
    background: var(--soft);
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: .03em;
}

h1,
h2,
h3 {
    line-height: 1.16;
    margin-top: 0;
    letter-spacing: -.025em;
}

h1 {
    max-width: 780px;
    overflow-wrap: anywhere;
    font-size: clamp(1.75rem, 5vw, 3.65rem);
}

h2 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

h3 {
    font-size: 1.18rem;
}

p:first-child {
    margin-top: 0;
}

.lead {
    max-width: 740px;
    color: var(--muted);
    font-size: 1.13rem;
}

.page-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 32px;
    margin-bottom: 20px;
}

.page-intro h1,
.page-intro .lead { margin: 0; }
.page-intro h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-intro .lead { flex: 1 1 16rem; font-size: 1em; }
.page-shell-compact { margin-block: 12px; padding-block: 16px; }

.two-column,
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.profile-basics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}
.form-grid { align-items: start; }
.form-grid .choice-grid { column-gap: 22px; }

.profile-basics > label {
    align-self: start;
}
.profile-basics .municipality-picker-split [data-municipality-search] { column-gap: 22px; }
@media (max-width: 759px) {
    .profile-basics { grid-template-columns: 1fr; }
}

.profile-basics input,
.profile-basics select {
    height: 48px;
}

.optional {
    color: var(--muted);
    font-weight: 400;
}

.panel,
.member-card,
.queue-item {
    padding: 21px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 2px 0 rgba(74, 45, 53, .02);
}

.stack {
    display: grid;
    gap: 16px;
}

.stack > h1,
.stack > h2,
.stack > h3,
.stack > p {
    margin-bottom: 0;
}

.numbered {
    display: flex;
    align-items: center;
    gap: 14px;
}

.numbered > span,
.icon-bubble {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: var(--rose-dark);
    background: var(--page);
    border-radius: 50%;
    font-weight: 800;
}

.numbered p {
    margin: 0;
}

.muted,
.meta {
    color: var(--muted);
}

.eyebrow,
.badge,
.tag {
    display: inline-flex;
    width: fit-content;
    padding: 6px 11px;
    color: var(--rose-dark);
    background: var(--soft);
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.eyebrow {
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.badge-warn {
    color: var(--warn);
    background: var(--warn-bg);
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.actions form {
    margin: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 18px;
    color: var(--text);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 11px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.button-primary {
    color: #fff;
    background: var(--rose);
    border-color: var(--rose);
}

.button-primary:hover {
    background: var(--rose-dark);
    border-color: var(--rose-dark);
}

.button-danger {
    color: var(--error);
    background: transparent;
    border-color: currentColor;
}

.button-quiet {
    background: transparent;
    border-color: transparent;
    text-decoration: underline;
    box-shadow: none;
}

.button[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-page {
    max-width: 900px;
    margin: auto;
}

.narrow-page {
    max-width: 520px;
    margin: auto;
}

.steps {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
}

.steps span {
    flex: 1;
    height: 8px;
    background: var(--line);
    border-radius: 999px;
}

.steps .done {
    background: linear-gradient(90deg, var(--rose), var(--terracotta));
}

label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    color: var(--text);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 9px;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #c7b3ad;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

small {
    display: block;
    color: var(--muted);
    font-weight: 400;
}

.full {
    grid-column: 1 / -1;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

legend {
    margin-bottom: 8px;
    font-weight: 700;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 48px;
    padding: 11px 12px;
    background: var(--page);
    border: 2px solid var(--line);
    border-radius: 9px;
}

.choice:has(input:checked) {
    background: #fff7f5;
    border-color: var(--rose);
}

.choice input {
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    min-height: 0;
    margin-top: 2px;
    accent-color: var(--rose);
}

.choice span {
    display: block;
    font-weight: 400;
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-left: 5px solid var(--focus);
    border-radius: 8px;
}

.notice ul {
    margin-bottom: 0;
}

.notice-info {
    background: #e8f2fb;
}

.notice-success {
    color: var(--good);
    background: var(--good-bg);
    border-color: var(--good);
}

.notice-error {
    color: var(--error);
    background: var(--error-bg);
    border-color: var(--error);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.member-card {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.member-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    content: "";
    background: linear-gradient(90deg, var(--rose), var(--terracotta), var(--sage));
}

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    color: var(--rose-dark);
    background: linear-gradient(145deg, var(--soft), #fff8f5);
    border: 2px dashed var(--line);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 800;
    overflow: hidden;
}

.avatar-large {
    width: 126px;
    height: 126px;
    font-size: 2rem;
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-width: 1px;
    font-size: .72rem;
}

.avatar-compact {
    width: 52px;
    height: 52px;
    font-size: .95rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.member-head h2,
.member-head h3 {
    margin-bottom: 3px;
}

.profile-edit-grid {
    align-items: start;
    grid-template-areas: "photo details" "blocked details";
    grid-template-rows: auto 1fr;
}

.profile-edit-grid > .profile-photo-panel { grid-area: photo; }
.profile-edit-grid > #profiloplysninger { grid-area: details; }
.profile-edit-grid > .blocked-people-card { grid-area: blocked; }

.profile-photo-panel {
    align-content: start;
}

.tags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 24px;
    padding: 18px;
    background: var(--soft);
    border-radius: 15px;
}

.filters .actions {
    margin-top: 0;
}

.profile-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 30px;
}

.profile-summary {
    text-align: center;
}

.profile-summary .avatar {
    margin-inline: auto;
}

.empty {
    padding: 34px;
    text-align: center;
    color: var(--muted);
    background: linear-gradient(135deg, rgba(245, 234, 230, .7), rgba(237, 243, 234, .65));
    border: 2px dashed var(--line);
    border-radius: 14px;
}

.request-row,
.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.conversation-list {
    display: grid;
    gap: 8px;
    align-content: start;
}

.conversation-link {
    display: flex;
    padding: 15px;
    color: var(--text);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 11px;
    text-decoration: none;
}

.conversation-link:hover {
    border-color: var(--rose);
    box-shadow: var(--shadow-soft);
}

.conversation-link.is-unread {
    border-left: 6px solid var(--rose-dark);
    background: var(--soft-green);
}

.unread-label {
    display: inline-block;
    padding: 4px 8px;
    color: var(--text);
    background: var(--soft-green);
    border-radius: 6px;
}

details > summary {
    cursor: pointer;
    font-weight: 700;
}

.photo-review,
.compact-form {
    margin-top: 14px;
}

.photo-review > summary {
    list-style: none;
}

.photo-review > summary::-webkit-details-marker {
    display: none;
}

.moderation-photo-frame {
    width: min(420px, 100%);
    margin-top: 12px;
    padding: 10px;
    background: var(--page);
    border: 2px solid var(--line);
    border-radius: 14px;
}

.moderation-photo-frame img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 8px;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 22px 0 16px;
    border-bottom: 2px solid var(--line);
}

.tabs a {
    padding: 10px 12px;
    text-decoration: none;
    font-weight: 700;
}

.tabs a.current,
.tabs a[aria-current="page"] {
    color: var(--rose-dark);
    border-bottom: 4px solid var(--rose);
}

.message-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-count {
    padding: 4px 8px;
    color: var(--muted);
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .82rem;
    line-height: 1;
}

.message-tabs a[aria-current="page"] .tab-count {
    color: var(--rose-dark);
    background: var(--surface);
    border-color: var(--rose);
}

.queue,
.timeline,
.member-notice-list {
    display: grid;
    gap: 12px;
}

.moderation-columns {
    display: grid;
    gap: 24px;
}

.moderation-columns section {
    scroll-margin-top: 92px;
}

.pagination {
    margin-top: 20px;
}

.moderation-log-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.moderation-log-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
}

.moderation-log-heading h3,
.moderation-log-heading h4 {
    margin-bottom: 0;
}

.note-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.moderation-log-heading time {
    color: var(--muted);
    white-space: nowrap;
}

.moderation-log-details {
    display: flex;
    gap: 10px 24px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.moderation-log-details div {
    display: flex;
    gap: 6px;
}

.moderation-log-details dt {
    font-weight: 800;
}

.moderation-log-details dd {
    margin: 0;
}

.section-spaced,
.audit-panel {
    margin-top: 28px;
}

.content-page {
    max-width: 920px;
    margin-inline: auto;
}

.content-page > h1 {
    margin-bottom: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.info-grid .panel {
    align-content: start;
}

.legal-copy ul,
.check-list {
    display: grid;
    gap: 9px;
    padding-left: 1.3rem;
}

/* Forside */
.home-page {
    display: grid;
    gap: clamp(58px, 8vw, 92px);
}

.home-hero {
    display: grid;
    grid-template-columns: .92fr 1.08fr;
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
}

.hero-copy h1 {
    margin-bottom: 20px;
}

.hero-copy .lead {
    max-width: 610px;
}

.hero-visual {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 34% 18% 28% 16% / 18% 25% 17% 27%;
    box-shadow: 0 24px 50px rgba(90, 48, 58, .2);
    transform: rotate(1deg);
}

.hero-visual::before {
    position: absolute;
    z-index: -1;
    inset: -22px 24% 55% -24px;
    content: "";
    background: var(--soft);
    border-radius: 50%;
}

.hero-visual img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 32% 16% 27% 14% / 16% 23% 15% 25%;
}

.section-heading {
    max-width: 640px;
    margin: 0 auto 28px;
    text-align: center;
}

.section-heading h2 {
    margin-bottom: 0;
}

.step-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.step-card {
    position: relative;
    padding: 25px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.step-card:nth-child(2) {
    background: var(--soft-green);
}

.step-card:nth-child(3) {
    background: var(--cream);
}

.step-card h3 {
    margin: 17px 0 8px;
    font-size: 1.28rem;
}

.step-card p {
    margin: 0;
    color: var(--muted);
}

.step-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: linear-gradient(145deg, var(--rose), var(--terracotta));
    border-radius: 14px 14px 14px 4px;
    font-weight: 800;
}

.trust-story {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) 1.2fr;
    gap: clamp(30px, 6vw, 70px);
    align-items: center;
    padding: clamp(22px, 5vw, 48px);
    background: linear-gradient(130deg, var(--soft-green), #f5f1e8);
    border-radius: 24px;
}

.story-image {
    position: relative;
    margin: 0;
}

.story-image::before {
    position: absolute;
    inset: 14px -14px -14px 14px;
    content: "";
    border: 2px solid rgba(99, 126, 102, .34);
    border-radius: 20px;
}

.story-image img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.story-copy h2 {
    max-width: 560px;
    margin-bottom: 14px;
}

.story-copy p {
    color: var(--muted);
}

.check-list {
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 29px;
}

.check-list li::before {
    position: absolute;
    left: 0;
    top: .08rem;
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    color: #fff;
    content: "✓";
    background: var(--sage);
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 800;
}

.text-link {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin-top: 8px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        max-width: 720px;
    }

    .hero-visual {
        width: min(760px, 100%);
        margin-inline: auto;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .two-column,
    .form-grid,
    .profile-layout,
    .info-grid,
    .trust-story {
        grid-template-columns: 1fr;
    }

    .profile-edit-grid {
        grid-template-areas: "photo" "details" "blocked";
        grid-template-rows: auto;
    }

    .profile-summary {
        text-align: left;
    }

    .profile-summary .avatar {
        margin-inline: 0;
    }

    .request-row,
    .queue-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .step-cards {
        grid-template-columns: 1fr;
    }

    .step-card {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0 16px;
    }

    .step-card .step-number {
        grid-row: 1 / 3;
    }

    .step-card h3 {
        margin: 0 0 6px;
    }

}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .page-shell {
        width: calc(100% - 18px);
        margin: 10px auto;
        padding: 24px 15px;
        border-radius: 16px;
    }

    h1 {
        font-size: clamp(2.05rem, 11vw, 2.8rem);
    }

    .choice-grid,
    .filters,
    .cards {
        grid-template-columns: 1fr;
    }

    .actions > .button,
    .actions > form,
    .actions > form > .button {
        width: 100%;
    }

    .home-page {
        gap: 50px;
    }

    .hero-visual {
        border-radius: 22px;
        transform: none;
    }

    .hero-visual img {
        min-height: 280px;
        border-radius: 16px;
    }

    .trust-story,

    .story-image {
        margin-right: 14px;
    }

}

/* Fælles komponenter til chat, rapportering og kommende piktogrammer. */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--cream);
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.role-badge::before {
    content: "";
    width: 1.25rem;
    height: 1.5rem;
    flex-shrink: 0;
    background: url('../images/shield.png') center / contain no-repeat;
}

.role-badge-admin {
    border-color: var(--rose);
    background: #fff4f6;
}

.role-badge-super_moderator {
    border-color: var(--warn);
    background: var(--warn-bg);
}

.report-reasons {
    margin: 0;
    padding: 0;
    border: 0;
}

.report-reason-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.report-reason {
    position: relative;
    cursor: pointer;
}

.report-reason input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
}

.report-reason span {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 0.7rem 0.85rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-weight: 700;
}

.report-reason input:checked + span {
    border-color: var(--rose);
    background: #fff4f6;
}

.report-reason input:focus-visible + span {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-pictogram {
    display: inline-grid;
    width: 1.7rem;
    height: 1.7rem;
    place-items: center;
    border: 2px dashed var(--line);
    border-radius: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.filter-pictogram-image {
    border: 0;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
}

.presence-list,
.support-people {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.presence-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.presence-list li form {
    margin-left: auto;
}

.deleted-moderator-message {
    margin-block: 0.5rem;
}

@media (max-width: 600px) {
    .report-reason-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .button {
        transition: none;
    }
}

.page-heading,
.admin-user,
.restriction-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0;
}

.stat-card {
    display: grid;
    gap: 4px;
    padding: 20px;
    background: linear-gradient(145deg, #fff, var(--cream));
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.stat-card strong {
    color: var(--rose-dark);
    font-size: 2rem;
}

.case-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 22px;
    align-items: start;
    margin: 24px 0;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.detail-list div {
    padding: 12px;
    background: var(--cream);
    border-radius: 12px;
}

.detail-list dt {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 4px 0 0;
    font-weight: 700;
}

.case-evidence {
    margin: 0;
    padding: 16px;
    background: var(--soft-green);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.private-report-context {
    max-width: 880px;
    margin-inline: auto;
}

.private-context-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.private-context-message {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow-wrap: anywhere;
}

.private-context-message.is-target {
    border: 3px solid var(--terracotta);
    background: var(--cream);
    box-shadow: 0 0 0 3px rgba(190, 112, 83, .18);
}

.private-context-heading {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.private-context-message p {
    margin: 6px 0 0;
    white-space: pre-wrap;
}

.restriction-summary {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 14px;
    background: #fff7e7;
    border-radius: 14px;
}

.restriction-summary span {
    padding: 5px 9px;
    background: #fff;
    border-radius: 999px;
    font-size: .86rem;
}

.timeline article {
    padding: 14px 0 14px 18px;
    border-left: 3px solid var(--sage);
}

.timeline p {
    margin: 5px 0;
}

.admin-user {
    flex-wrap: wrap;
}

.admin-user-summary {
    flex: 1 1 300px;
}

.admin-user details {
    flex: 1 1 260px;
    max-width: 360px;
}

.admin-user summary {
    color: var(--rose-dark);
    cursor: pointer;
    font-weight: 800;
}

.badge-danger {
    color: #7e2626;
    background: #ffe1dc;
}

.report-row > .button {
    flex: 0 0 auto;
}

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, var(--surface), var(--cream));
}

.dashboard-welcome h1 {
    margin: 0;
}

.dashboard-welcome .lead {
    margin: 10px 0 0;
}

.dashboard-welcome .eyebrow {
    margin-bottom: 4px;
    padding: 0;
    border: 0;
}

.dashboard-welcome > .button {
    flex-shrink: 0;
}

.dashboard-bottom-grid {
    margin-top: 18px;
}

.text-wrap {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dashboard-room-link {
    display: block;
}

.community-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.community-stats div {
    display: grid;
    gap: 2px;
    padding: 16px;
    background: var(--soft-green);
    border-radius: 12px;
}

.community-stats strong {
    color: var(--rose-dark);
    font-size: 1.8rem;
}

.dashboard-restriction {
    margin-bottom: 22px;
    color: var(--warn);
    background: var(--warn-bg);
}

.dashboard-top-card {
    margin-bottom: 18px;
}

.dashboard-account-notices {
    margin-top: 24px;
}

.dashboard-contact .unread-label {
    flex: 0 1 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.dashboard-card {
    min-width: 0;
}

.dashboard-card h2 {
    margin-bottom: 14px;
}

.dashboard-card-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-attention-list,
.dashboard-contact-list,
.profile-checklist {
    display: grid;
    gap: 9px;
}

.dashboard-attention-list a,
.dashboard-contact {
    padding: 13px;
    color: var(--text);
    text-decoration: none;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.dashboard-attention-list a {
    display: grid;
    gap: 2px;
}

.dashboard-attention-list a:hover,
.dashboard-contact:hover {
    border-color: var(--rose);
}

.dashboard-contact-copy {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-contact-copy > span {
    overflow-wrap: anywhere;
}

.dashboard-zero {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    background: var(--soft-green);
    border-radius: 12px;
}

.dashboard-zero p {
    margin-top: 0;
}

.profile-checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-checklist li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
}

.profile-checklist li > span:first-child {
    color: var(--warn);
    font-size: 1.2rem;
    font-weight: 800;
}

.profile-checklist li.is-complete > span:first-child {
    color: var(--good);
}

.profile-checklist a {
    color: var(--text);
}

.profile-checklist a:hover strong {
    color: var(--rose-dark);
}

.dashboard-profile-card.is-complete {
    padding-block: 18px;
    background: var(--soft-green);
}

.dashboard-profile-complete {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    gap: 6px 12px;
}

.dashboard-profile-complete-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: #fff;
    font-weight: 800;
    background: var(--good);
    border-radius: 50%;
}

.dashboard-profile-complete h2,
.dashboard-profile-complete p {
    margin: 0;
}

.dashboard-profile-complete h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.2;
}

.member-notice {
    padding: 16px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.member-notice.is-unread {
    border-left: 5px solid var(--rose);
}

.member-notice-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.member-notice h3,
.member-notice p {
    margin-top: 0;
}

.member-notice form {
    margin: 0;
}

.profile-edit-target {
    scroll-margin-top: 110px;
}

.dashboard-role-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--soft-green), var(--surface));
}

@media (max-width: 900px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .case-layout,
    .history-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {

    .page-heading,
    .admin-user,
    .restriction-summary {
        flex-direction: column;
    }

    .stat-grid,
    .detail-list {
        grid-template-columns: 1fr;
    }

    .admin-user details,
    .report-row > .button {
        width: 100%;
        max-width: none;
    }

    .dashboard-welcome,
    .dashboard-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-card-heading > .button,
    .member-notice .button {
        width: 100%;
    }

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

    .dashboard-role-card {
        grid-column: auto;
    }

}
