.poppins-extrabold-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-style: italic;
}

.poppins-bold-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: italic;
}

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --bright-blue: rgb(50,50,150);
  --bright-blue-highlight: rgb(60,60,160);
  --murkey-gray: rgb(45,45,68);
  --murkey-gray-highlight: rgb(55,55,78);
}

html {
    /* Sets base size to 10px (16px * 62.5%) */
    font-size: 62.5%; 
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

form {
  display: contents;
}

.post-interact-icon {
    width: 2.6rem;
    height: 2.6rem;
    stroke: #bbb; 
    fill: #bbb; 
    stroke-width: .01px;
}

.post-reply-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2em;
    width: auto;
    height: auto;
    padding: 0;
    white-space: nowrap;
}

.post-reply-button .post-interact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    transform: translateY(-2.5px);
}

.post-reply-button svg {
    width: 18px;
    height: 18px;
}

.post-interact-icon:hover {
    stroke: #fff; 
    fill: #fff; 
}

.post-interact-icon.like-active {
    stroke: #0b7; 
    fill: #0b7; 
}

.post-interact-icon.like-active:hover {
    stroke: #4d9; 
    fill: #4d9; 
}

.post-interact-icon.dislike-active {
    stroke: #b30; 
    fill: #b30; 
}

.post-interact-icon.dislike-active:hover {
    stroke: #d40; 
    fill: #d40; 
}

.post-interact-reply-count {
    color: #bbb;
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 0;
    padding-left: 0;
}

button, button:hover, button:active {
    background-color: transparent;
    border-color: transparent;
}

.legacy-button {
    background-color: var(--murkey-gray);
    color: white;
    margin-bottom: 1vw;
    margin-right: 2vw;
    border-color: #555;
    /*font-size: 2.0rem; */
    padding: .5rem;
}

.legacy-button:hover {
    background-color: #444;
    color: white;
    padding: .5rem;
}

.legacy-button:active {
    background-color: #222;
    color: white;
    padding: .5rem;
}

body {
    font-size: 1.6rem;
    background-color: rgb(25,25,30); 
    color: white;
    padding: 0;
    margin: 0;
}

button {
    color: white;
    font: inherit; 
    letter-spacing: inherit; 
    text-rendering: inherit;
    border-width: 0;
}

a {
    color: orange; 
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

a:visited {
    color: orange; 
}

.navbar-left {
    display: flex;
    align-items: stretch;
}
.navbar-right {
    display: flex;
    align-items: stretch;
}

/* add a black background color to the top navigation */
.topnav {
    background-color: rgb(35, 35, 45);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    min-height: 48px;
    box-sizing: border-box;
}

/* style the links inside the navigation bar */
.topnav a, .topnav span, .topnav button {
    display: inline-flex;
    align-items: center;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px; 
    text-decoration: none;
    font-size: 17px;
    box-sizing: border-box;
}

/* change the color of links on hover */
.topnav a:hover, .topnav button:hover {
    background-color: #ddd;
    color: black;
}

/* add a color to the active/current link */
.topnav a.active, .topnav button.active {
    background-color: #04aa6d;
    color: white;
}

.main-column {
    width:60rem;
    margin: auto; 
    margin-top: 1.5em;
    font-size: 90%;
}

.main-box {
    font-size: 120%;
    padding-left:.5rem;
    padding-right:.25em;
    word-wrap: anywhere;
    overflow-wrap: anywhere;
    /*
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 1.5rem;

    */
}

.standard-card.main-post {
    border: None;
    padding-left:.25em;
    padding-right:.25em;
    display: flex; 
    flex-direction:
    column; align-items: 
    flex-start; 
    gap:1.5rem; 
    padding-bottom:3em;
    font-size: 120%;

}

.standard-card {
    border: .2px solid var(--murkey-gray); 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center; 
    text-align: left;
    margin: 0;  
    padding-top:1.0rem;
    padding-bottom:1.0rem;
    gap: 1.5rem;
    word-wrap: anywhere;
    overflow-wrap: anywhere;
    
    /* */ 
    width: -moz-available;
    width: -webkit-fill-available;
    width: stretch;
}

.post-content-box {
    width: 100%;
    padding-left:1.5em;
    padding-right:1.5em;
}

.link-preview-box {
    border: .2px solid var(--murkey-gray); 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: left;  
    text-align: left;
    margin: 1rem;
    margin-left: 0rem;
    margin-right: 0rem;
    border-radius: 1rem;
    overflow: hidden; 

    /* */ 
    width: -moz-available;
    width: -webkit-fill-available;
    width: stretch;
    gap: 1rem;
}

.image-fill-available {
    max-width: 100%;
    height: auto; /* Maintains the aspect ratio */
    display: block; /* Removes the weird gap at the bottom of images */
    overflow: hidden; /* Safety net */
}

/* Cloudflare Stream video player embed */
.link-preview-box.stream-player-box {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 1rem;
    overflow: hidden;
    margin: 1rem 0;
    border: .2px solid var(--murkey-gray);
    /* Mobile WebKit composites iframes on their own layer and ignores the
       parent's overflow clipping; promote this box to its own layer and
       clip-path it so the rounded corners are honored on iOS. */
    transform: translateZ(0);
    clip-path: inset(0 round 1rem);
}

.link-preview-box.stream-player-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 1rem;
}

/* Image preview grid (Mastodon-style 1-4 images) */
.link-preview-box.image-grid {
    display: grid;
    gap: 2px;
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    background-color: var(--murkey-gray);
    box-sizing: border-box;
    width: 100%;
    width: -moz-available;
    width: -webkit-fill-available;
    width: stretch;
    border-radius: 1rem;
    overflow: hidden;
    margin: 1rem 0;
    border: .2px solid var(--murkey-gray);
}

.link-preview-box.image-grid.image-grid-1 {
    display: block;
    max-height: 500px;
    background-color: transparent;
}

.link-preview-box.image-grid.image-grid-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    aspect-ratio: 16 / 9;
    max-height: 380px;
    min-height: 180px;
}

.link-preview-box.image-grid.image-grid-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16 / 9;
    max-height: 400px;
    min-height: 200px;
}

.link-preview-box.image-grid.image-grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16 / 9;
    max-height: 420px;
    min-height: 220px;
}

.image-grid-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    background-color: rgb(22, 22, 32);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-grid-1 .image-grid-item {
    width: 100%;
    max-height: 500px;
    background-color: transparent;
}

.image-grid-3 .image-grid-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.image-grid-3 .image-grid-item:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.image-grid-3 .image-grid-item:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.image-grid-4 .image-grid-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.image-grid-4 .image-grid-item:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.image-grid-4 .image-grid-item:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

.image-grid-4 .image-grid-item:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.image-grid-1 .image-grid-item img {
    max-height: 500px;
    height: auto;
    width: 100%;
    object-fit: cover;
    display: block;
}

.image-grid-item:hover img {
    filter: brightness(1.1);
}

.image-grid-item:focus-visible {
    outline: 2px solid var(--bright-blue-highlight);
    outline-offset: -2px;
}

/* Lightbox Popout */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.image-lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox__image {
    max-width: 90vw;
    max-height: 86vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    cursor: default;
    transition: opacity 0.15s ease;
}

.image-lightbox__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    background-color: rgba(30, 30, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2.4rem;
    line-height: 1;
    z-index: 100000;
    transition: background-color 0.15s ease, transform 0.15s ease;
    padding: 0;
}

.image-lightbox__close:hover {
    background-color: rgba(60, 60, 80, 0.95);
    transform: scale(1.08);
}

.image-lightbox__link {
    position: absolute;
    top: 2rem;
    right: 7.2rem;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    background-color: rgba(30, 30, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 100000;
    transition: background-color 0.15s ease, transform 0.15s ease;
    padding: 0;
}

.image-lightbox__link:hover {
    background-color: rgba(60, 60, 80, 0.95);
    transform: scale(1.08);
}

.image-lightbox__link svg {
    width: 2rem;
    height: 2rem;
}

.image-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 50%;
    background-color: rgba(30, 30, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2.8rem;
    line-height: 1;
    z-index: 100000;
    transition: background-color 0.15s ease, transform 0.15s ease;
    padding: 0;
}

.image-lightbox__nav:hover {
    background-color: rgba(60, 60, 80, 0.95);
    transform: translateY(-50%) scale(1.08);
}

.image-lightbox__nav--prev {
    left: 2rem;
}

.image-lightbox__nav--next {
    right: 2rem;
}

.image-lightbox__counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #eee;
    padding: 0.5rem 1.6rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 550;
    letter-spacing: 0.5px;
    z-index: 100000;
}

.standard-card.reply-card {
    padding-right:3rem;
}

.spacy-div {
    border-top: .2px solid var(--murkey-gray); 
    border-right: None;
    border-left: None;
    padding-top: 1rem;
    width: -moz-available;
    width: -webkit-fill-available;
    width: stretch; 
}

.post-action-bar {
  font-size: 80%;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding-left: 1.5em;
  padding-right: 1.5em;
}


.standard-card.post-card:hover {
    background-color: rgb(27,27,38);
/*    border-color: #750; */
}

@media screen and (max-width: 600px) {
    
    .main-column {
        width: 100vw;
        min-width: 100vw; 
        margin: auto; 
        margin-top: 3rem;
        box-sizing: border-box;
    }

    .standard-card {
        border-left: none;
        border-right: none; 
    }
    
    .standard-card.reply-card {
        border: none;
    }

    .image-lightbox__nav {
        width: 4rem;
        height: 4rem;
        font-size: 2.4rem;
    }
    .image-lightbox__nav--prev {
        left: 0.8rem;
    }
    .image-lightbox__nav--next {
        right: 0.8rem;
    }
    .image-lightbox__close {
        top: 1.2rem;
        right: 1.2rem;
        width: 4rem;
        height: 4rem;
        font-size: 2.2rem;
    }
    .image-lightbox__link {
        top: 1.2rem;
        right: 5.8rem;
        width: 4rem;
        height: 4rem;
    }
    .image-lightbox__image {
        max-width: 95vw;
        max-height: 80vh;
    }
    .link-preview-box.image-grid.image-grid-2,
    .link-preview-box.image-grid.image-grid-3,
    .link-preview-box.image-grid.image-grid-4 {
        max-height: 280px;
    }
}

/* css */
.hidden {
    display: none !important; /* the !important ensures it overrides other display properties */
}

.post-reply-box {
    padding-left:2rem; 
    padding-right:3rem; 
    align-items: center; 
    width: -moz-available;
    width: -webkit-fill-available;
    width: stretch;
}

.reply-quote {
    border-radius: 1rem; 
    border: .2px solid transparent; 
    background-color: var(--murkey-gray);
    padding:1rem; 
    margin-top:1rem; 
    margin-bottom:1rem;
    width:fit-content;
}


.standard-card:hover .link-preview-box {
    background-color: rgb(25,25,30); 
}

.standard-card:hover .link-preview-box:hover {
    background-color: rgb(27,27,38);
/*    border-color: #750; */
}

.standard-card:has(.link-preview-box:hover) {
    background-color: rgb(25,25,30); 
/*    border-color: #333; */
}

.reply-quote:hover {
    background-color: var(--murkey-gray-highlight);
/*    border-color: #750; */
}

.standard-card:has(.reply-quote:hover) {
    background-color: rgb(25,25,30); 
    /*border-color: #333; */
}

.modal-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.2);
    backdrop-filter: blur(2px);
    display: None;
    z-index: 1000;
}

.modal-container.show {
    display: flex;
}

/*********************************************************************************/
/********************************* login styles **********************************/
/*********************************************************************************/

.login__login_modal {
    width: 40rem;
    max-width: 95%;
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--murkey-gray);
    padding: 3rem;
    border-radius: 1rem;
    gap: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
}

.login__login_button {
    color: white;
    padding: .5em;
    background-color: #c50;
    min-width: 15em;
    border-radius: 1rem;
    text-align: center;
    font-weight: 550;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.login__login_button:hover {
    background-color: #d61;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/*********************************************************************************/
/******************************* END login styles ********************************/
/*********************************************************************************/


/*********************************************************************************/
/**************************** submit_post_tray styles ****************************/
/*********************************************************************************/

.submit_post_tray__open_button {
    color: white;
    width: 100%;
    padding: .5em;
    border-radius: 1rem;
    font-weight: 550;
    #background-color: var(--murkey-gray);
    background-color: var(--bright-blue);
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.submit_post_tray__open_button:hover {
    #background-color: rgb(50,50,73);
    background-color: var(--bright-blue-highlight);
}

.submit_post_tray__outer_tray {
    padding-top: 1em;
    padding-bottom: 1em;
}

.submit_post_tray__input_tray {
    padding: 1em;
    padding-bottom: 0em;
    width: 100%;
    background-color: var(--murkey-gray);
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); 
}

.submit_post_tray__textarea {
    padding: 0.5em;
    overflow: hidden;
    width: 100%;
    min-height: 5em;
    resize: none;
    background-color: rgb(35,35,45);
    border: none;
    border-radius: 0.5rem;
    color: white;
    outline: none;
}

.submit_post_tray__buttons_bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: .5em;
    padding-bottom: .25em;
}

.submit_post_tray__buttons_group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.submit_post_tray__submit_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding-top: .25em;
    padding-bottom: .5em;
}

.submit_post_tray__cancel_button {
    padding: .5em;
    border-radius: 1rem;
    font-weight: 550;
    color: white;
}

.submit_post_tray__cancel_button:hover {
}

.submit_post_tray__submit_button {
    color: white;
    padding: .5em 1.2em;
    background-color: #c50;
    min-width: 8em;
    border-radius: 1rem;
    text-align: center;
    font-weight: 550;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.submit_post_tray__submit_button:hover {
    background-color: #d61;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.submit_post_tray__submit_button.submit_post_tray__disabled {
    background-color: #555;
}

.submit_post_tray__attach_button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background-color: rgb(35, 35, 45);
    border: 1px solid var(--murkey-gray-highlight);
    border-radius: 0.8rem;
    color: #bbb;
    font-size: 1.3rem;
    font-weight: 550;
    cursor: pointer;
    transition: all 0.15s ease;
}

.submit_post_tray__attach_button:hover {
    background-color: var(--murkey-gray-highlight);
    color: #fff;
    border-color: #777;
}

.submit_post_tray__attach_button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.submit_post_tray__attach_icon {
    width: 1.6rem;
    height: 1.6rem;
    fill: currentColor;
}

.submit_post_tray__attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding-top: 0.8rem;
    padding-bottom: 0.4rem;
}

.submit_post_tray__thumbnail {
    position: relative;
    width: 7.2rem;
    height: 7.2rem;
    border-radius: 0.8rem;
    overflow: hidden;
    transform: translateZ(0);
    background-color: rgb(25, 25, 35);
    border: 1px solid var(--murkey-gray-highlight);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.submit_post_tray__thumbnail img,
.submit_post_tray__thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Filename label overlaid on the bottom edge of an attachment thumbnail */
.submit_post_tray__thumbnail_name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.2rem 0.4rem;
    background-color: rgba(0, 0, 0, 0.65);
    color: #eee;
    font-size: 1.1rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submit_post_tray__thumbnail_remove {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease;
}

.submit_post_tray__thumbnail_remove:hover {
    background-color: #ef4444;
    border-color: #ef4444;
}

.submit_post_tray__thumbnail_spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    gap: 0.3rem;
}

.submit_post_tray__spinner {
    width: 1.8rem;
    height: 1.8rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: submit_tray_spin 0.8s linear infinite;
}

@keyframes submit_tray_spin {
    to { transform: rotate(360deg); }
}

/* Quiet context line at the top of the submit tray: names the destination
   and the acting profile, shown when the caller passes a destination. */
.submit_post_tray__context {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    color: #8f8fae;
    line-height: 1.4;
}

.submit_post_tray__context_avatar {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.submit_post_tray__context_name {
    color: #d8d8e4;
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The topic marker's hash: its own element — the SVG hash icon — a little
   larger than the surrounding context text, tinted like it. Centered on
   the text's middle so it lines up vertically with the row's avatars. */
.submit_post_tray__context_topic_hash {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 1;
}

.submit_post_tray__context_topic_hash svg {
    width: 1.2em;
    height: 1.2em;
    fill: currentColor;
}

/* Selectable destination (aggregator): an outlined chip with a caret that
   opens a dropdown of domains to post into. */
.submit_post_tray__context_select_wrap {
    position: relative;
    display: inline-flex;
}

.submit_post_tray__context_select {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3em 0.7em 0.3em 0.5em;
    background-color: rgb(35, 35, 45);
    border: 1px solid var(--murkey-gray-highlight);
    border-radius: 0.8rem;
    font-family: inherit;
    font-size: 1.15rem;
    color: #d8d8e4;
    cursor: pointer;
    transition: all 0.15s ease;
}

.submit_post_tray__context_select:hover,
.submit_post_tray__context_select_open {
    border-color: #777;
    background-color: var(--murkey-gray-highlight);
    color: #fff;
}

.submit_post_tray__context_caret {
    display: inline-flex;
    color: #8f8fae;
    transition: transform 0.15s ease;
}

.submit_post_tray__context_caret svg {
    width: 1.2rem;
    height: 1.2rem;
}

.submit_post_tray__context_select_open .submit_post_tray__context_caret {
    transform: rotate(180deg);
}

.submit_post_tray__context_menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: 20rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.4rem;
    background-color: rgb(35, 35, 45);
    border: 1px solid var(--murkey-gray-highlight);
    border-radius: 0.8rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.submit_post_tray__context_menu.hidden {
    display: none;
}

.submit_post_tray__context_option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45em 0.6em;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1.15rem;
    color: #d8d8e4;
    text-align: left;
    cursor: pointer;
}

.submit_post_tray__context_option:hover {
    background-color: var(--murkey-gray-highlight);
    color: #fff;
}

.submit_post_tray__context_option_active {
    background-color: var(--murkey-gray-highlight);
}

/* The "as @profile" part of the chip and the dropdown rows. */
.submit_post_tray__context_profile {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.submit_post_tray__context_noprofile {
    font-style: italic;
    color: #8f8fae;
}

/*********************************************************************************/
/***************************** Chat / messaging styles ***************************/
/*********************************************************************************/

.chat-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.chat-message__body {
    min-width: 0;
    flex: 1;
}

.chat-message__meta {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.chat-message__name {
    font-weight: 600;
}

.chat-message__time {
    font-size: 0.8em;
    color: #8f8fae;
}

.chat-message__content {
    overflow-wrap: anywhere;
}

/*********************************************************************************/
/***************************** Chat settings modal *******************************/
/*********************************************************************************/

.chat-settings-modal {
    width: 34rem;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background-color: var(--murkey-gray);
    padding: 1.25rem 2rem 1.75rem;
    border-radius: 1rem;
    gap: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    text-align: left;
}

.chat-settings-modal__header {
    font-size: 150%;
    font-weight: 700;
    text-align: center;
    padding: 0.5rem 2.5rem 0.9rem;
}

.chat-settings-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    fill: white;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.chat-settings-modal__section {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chat-settings-modal__label {
    color: #a1a1aa;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.chat-settings-modal__row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.chat-settings-modal__button {
    padding: 0.5em 1.1em;
    border-radius: 1rem;
    font-weight: 550;
    background-color: var(--murkey-gray-highlight);
    color: white;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.chat-settings-modal__button:hover {
    filter: brightness(1.15);
}

.chat-settings-modal__button:disabled {
    opacity: 0.5;
    cursor: default;
}

.chat-settings-modal__button--danger {
    background-color: #a33;
}

.chat-settings-modal__button--danger:hover {
    background-color: #c44;
    filter: none;
}

.chat-settings-modal__avatar {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 22%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-settings-modal__hint {
    color: #a1a1aa;
    font-size: 90%;
}

.chat-settings-modal__members {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 11rem;
    overflow-y: auto;
    width: 100%;
}

.chat-settings-modal__member {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.chat-settings-modal__member_avatar {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.8rem;
}

.chat-settings-modal__member_name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-settings-modal__autocomplete {
    position: relative;
    display: flex;
    gap: 0.6rem;
    width: 100%;
}

.chat-settings-modal__suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--murkey-gray-highlight);
    border-radius: 0.5rem;
    overflow: hidden;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.chat-settings-modal__option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

.chat-settings-modal__option:hover {
    background-color: rgba(255,255,255,0.08);
}

/*********************************************************************************/
/************************* END submit_post_tray styles ***************************/
/*********************************************************************************/


/*********************************************************************************/
/******************************* Toast Notifications *****************************/
/*********************************************************************************/

#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    background-color: var(--murkey-gray);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    font-family: "Poppins", sans-serif;
    font-size: 1.4rem;
    min-width: 20rem;
    max-width: 40rem;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left: 5px solid #0b7;
}

.toast-error {
    border-left: 5px solid #f06;
}

.toast-info {
    border-left: 5px solid #09f;
}

/*********************************************************************************/
/***************************** END Toast Notifications ***************************/
/*********************************************************************************/


/*********************************************************************************/
/********************************* signup styles *********************************/
/*********************************************************************************/

.signup__card {
    width: 60rem; 
    max-width: 95%;
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--murkey-gray);
    padding: 3rem;
    border-radius: 1rem;
    gap: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
}

.signup__signup_button {
    color: white;
    padding: .5em;
    background-color: #c50;
    min-width: 15em;
    border-radius: 1rem;
    text-align: center;
    font-weight: 550;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    align-self: center;
}

.signup__signup_button:hover {
    background-color: #d61;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/*********************************************************************************/
/******************************* END signup styles *******************************/
/*********************************************************************************/


/*********************************************************************************/
/**************************** community sidebar styles ***************************/
/*********************************************************************************/

.page-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 90rem;
    margin: auto;
    font-size: 95%;
}

.page-layout .main-column {
    margin: 0;
    margin-top: 1.5em;
}

.left-sidebar {
    width: 28rem;
    flex-shrink: 0;
    margin-top: 1.5em;
    font-size: 90%;
}

/* Sidebar identity block: the current domain (avatar, name, full
   domain-name) stacked above the acting profile (avatar, username,
   full handle). Hidden entirely when nothing resolved. */
.community-sidebar__identity {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--murkey-gray);
    margin-bottom: 1rem;
}

.community-sidebar__identity:empty {
    display: none;
}

.community-sidebar__identity_row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

/* The domain identity row is a link to the domain's page: keep the row's
   look unchanged (the global anchor color and underline don't apply). */
a.community-sidebar__identity_row {
    color: inherit;
    text-decoration: none;
}

.community-sidebar__identity_avatar {
    width: 3rem;
    height: 3rem;
    font-size: 1.12rem;
    flex-shrink: 0;
}

.community-sidebar__identity_body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.community-sidebar__identity_name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-sidebar__identity_full {
    font-size: 0.95rem;
    color: #8f8fae;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The domain leads: larger avatar, bolder name, brighter host line. */
.community-sidebar__identity_row_domain .community-sidebar__identity_avatar {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.4rem;
}

.community-sidebar__identity_row_domain .community-sidebar__identity_name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.community-sidebar__identity_row_domain .community-sidebar__identity_full {
    font-size: 1.05rem;
    color: #bbb;
}

/* The domain's sidebar blurb, directly under its identity — sized like
   the breadcrumb text above it. */
.community-sidebar__identity_text {
    font-size: 1.4rem;
    color: #ddd;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* The acting profile, one unindented line beneath the domain row:
   "as" + small avatar + display name. */
.community-sidebar__identity_user {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.1rem;
    color: #ddd;
    min-width: 0;
    margin-top: .5rem;
}

.community-sidebar__identity_user_avatar {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.62rem;
}

.community-sidebar__identity_user_name {
    font-weight: 600;
    color: #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-sidebar__invite_button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #7b511f;
    border-radius: 0.5rem;
    color: #ffba70;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

.community-sidebar__invite_button:visited {
    color: #ffba70;
}

.community-sidebar__invite_button:hover, .community-sidebar__invite_button:focus-visible {
    color: #fff;
    background-color: #75400e;
}

.community-sidebar__invite_icon {
    display: inline-flex;
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
}

.community-sidebar__invite_icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.community-sidebar__header {
    font-size: 120%;
    font-weight: 700;
    padding-left: 1.5rem;
    padding-bottom: .5rem;
}

.community-sidebar__sidebar_text {
    white-space: pre-wrap;
    padding: 0.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--murkey-gray);
    margin-bottom: 1rem;
    color: #ddd;
}

.community-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.community-sidebar__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    color: #ddd;
    text-decoration: none;
    padding: 0.25rem 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
    transition: background-color 0.15s;
}

.community-sidebar__item_avatar {
    width: 3rem;
    height: 3rem;
    font-size: 1.12rem;
}

/* Icon-only sidebar avatar slot (e.g. the hash for topics): centers the
   SVG inside the avatar box and tints it like the row text. */
.community-sidebar__item_icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.community-sidebar__item_icon svg {
    width: 2.25rem;
    height: 2.25rem;
    fill: currentColor;
}

/* Pinned-topic marker: a small pin beside the title in the topics list. */
.community-sidebar__pin {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    color: #c50;
}

.community-sidebar__pin svg {
    width: 1.3rem;
    height: 1.3rem;
    fill: currentColor;
}

/* Domain-admin pin/unpin toggle beside a topic row. Kept outside the
   row's anchor (like the channel expand button) so toggling never
   navigates; the active state marks topics that are pinned. */
.community-sidebar__topic_pin {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    margin-right: 0.6rem;
    border: none;
    border-radius: 0.8rem;
    background: transparent;
    color: #8f8fae;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.community-sidebar__topic_pin:hover {
    background-color: var(--murkey-gray);
    color: #fff;
}

.community-sidebar__topic_pin_active,
.community-sidebar__topic_pin_active:hover {
    color: #c50;
}

.community-sidebar__topic_pin svg {
    width: 1.7rem;
    height: 1.7rem;
    fill: currentColor;
    pointer-events: none;
}

.community-sidebar__item_body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.community-sidebar__item:hover {
    background-color: var(--murkey-gray);
    color: white;
}

.community-sidebar__item:visited {
    color: #ddd;
}

/* The active channel/subchannel: filled row plus an orange bar on the left
   edge, so the container you are in stands out at a glance. */
.community-sidebar__item_active {
    background-color: var(--murkey-gray-highlight);
    color: #fff;
    box-shadow: inset 3px 0 0 0 #c50;
}

.community-sidebar__item_active:hover {
    background-color: var(--murkey-gray-highlight);
}

.community-sidebar__item_active .community-sidebar__title {
    color: #fff;
}

.community-sidebar__title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.community-sidebar__title_row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    min-width: 0;
}

.community-sidebar__access_icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    color: #fff;
}

/* A channel row: the channel link plus a separate expand button. Keeping
   the toggle outside the anchor means expanding can never navigate, and the
   button's big padded hit area is easy to land on. */
.community-sidebar__entry {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.25rem;
}

.community-sidebar__entry .community-sidebar__item {
    flex: 1;
    min-width: 0;
}

.community-sidebar__expand {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    margin-right: 0.6rem;
    border: none;
    border-radius: 0.8rem;
    background: transparent;
    color: #8f8fae;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.community-sidebar__expand:hover {
    background-color: var(--murkey-gray);
    color: #fff;
}

.community-sidebar__expand svg {
    width: 1.6rem;
    height: 1.6rem;
    transition: transform 0.15s ease;
    pointer-events: none;
}

.community-sidebar__expand_open svg {
    transform: rotate(180deg);
}

/* The expanded subchannel dropdown. Visibility is class-driven (an author
   display rule would defeat the hidden attribute). */
.community-sidebar__sublist {
    display: none;
    flex-direction: column;
    margin: 0.1rem 0 0.5rem 4.4rem;
    padding-left: 1rem;
    border-left: 2px solid var(--murkey-gray);
    gap: 0.2rem;
}

.community-sidebar__sublist_open {
    display: flex;
}

.community-sidebar__subitem {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0.8rem;
    color: #ddd;
    font-size: 1.4rem;
    text-decoration: none;
    min-height: 2.6rem;
    font-weight: 600;
}

/* The global a:visited rule recolors visited links orange; subchannels
   should stay neutral like every other sidebar row. */
.community-sidebar__subitem:visited {
    color: #ddd;
}

.community-sidebar__subitem:hover {
    background-color: var(--murkey-gray);
    color: #fff;
}

/* Active subchannel inside its expanded list (same treatment as the
   top-level active item, scaled to the subitem row). */
.community-sidebar__subitem_active {
    background-color: var(--murkey-gray-highlight);
    color: #fff;
    box-shadow: inset 3px 0 0 0 #c50;
}

.community-sidebar__subitem_active:hover {
    background-color: var(--murkey-gray-highlight);
}

.community-sidebar__subitem_active .community-sidebar__subitem_title {
    color: #fff;
}

.community-sidebar__subitem_title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-sidebar__subitem .community-sidebar__access_icon svg {
    width: 1.4rem;
    height: 1.4rem;
}

.community-sidebar__subitem_empty {
    padding: 0.5rem 0.2rem;
    color: #aaa;
    font-size: 1.3rem;
}

.community-sidebar__access_icon svg {
    width: 2.25rem;
    height: 2.25rem;
    fill: currentColor;
}

.community-sidebar__item:hover .community-sidebar__title {
    color: white;
}

.community-sidebar__description {
    font-size: 1.35rem;
    color: #aaa;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-sidebar__item:hover .community-sidebar__description {
    color: #ccc;
}

.community-sidebar__empty {
    color: #bbb;
    padding: 0.75rem 1.5rem;
}

.community-sidebar__create_button {
    display: block;
    color: white;
    width: 100%;
    padding: .5em;
    border-radius: 1rem;
    font-weight: 550;
    background-color: #c50;
    text-align: center;
    text-decoration: none;
    margin-top: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.community-sidebar__create_button:hover {
    background-color: #d61;
}

.community-sidebar__create_button:visited {
    color: white;
}

#community-edit:not(:empty) {
    margin-top: 1.5rem;
    border-top: 1px solid var(--murkey-gray);
    padding-top: 1rem;
}

/* Divides the aggregator sidebar's Domains section from the Communities
   section above it, mirroring the Members section's divider. */
.community-sidebar__domains:not(:empty) {
    margin-top: 1.5rem;
    border-top: 1px solid var(--murkey-gray);
    padding-top: 1rem;
}

.community-sidebar__edit_button {
    display: block;
    color: white;
    width: 100%;
    padding: .5em;    border-radius: 1rem;
    font-weight: 550;
    background-color: var(--murkey-gray);
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.community-sidebar__edit_button:hover {
    background-color: var(--murkey-gray-highlight);
}

.community-sidebar__edit_button:visited {
    color: white;
}

.community-sidebar__members:not(:empty) {
    margin-top: 1.5rem;
    border-top: 1px solid var(--murkey-gray);
    padding-top: 1rem;
}

.community-sidebar__members_header {
    font-size: 120%;
    font-weight: 700;
    padding-left: 1.5rem;
    padding-bottom: 0.5rem;
    color: #ddd;
}

.community-sidebar__member {
    color: #ddd;
    padding: 0.3rem 1.5rem;
}

.community-sidebar__member_owner {
    color: #c50;
}

.community-sidebar__close {
    display: none;
}

.navbar-hamburger {
    display: none;
}

.navbar-hamburger svg {
    width: 1.8rem;
    height: 1.8rem;
    fill: currentColor;
    display: block;
}

@media screen and (max-width: 900px) {

    .navbar-hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Collapse the sidebar into an overlay drawer toggled by the hamburger */
    .left-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: min(85vw, 32rem);
        height: 100vh;
        margin-top: 0;
        padding-top: 5rem;
        background-color: rgb(25,25,30);
        border-right: 1px solid var(--murkey-gray);
        box-shadow: 0 0 2rem rgba(0,0,0,0.6);
        overflow-y: auto;
        z-index: 900;
    }

    .left-sidebar.show {
        display: block;
    }

    .community-sidebar__close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        width: 2.4rem;
        fill: white;
        cursor: pointer;
        padding: 0;
    }
}

/*********************************************************************************/
/************************** END community sidebar styles *************************/
/*********************************************************************************/


/*********************************************************************************/
/****************************** breadcrumb styles ********************************/
/*********************************************************************************/

#breadcrumbs {
    /* Lives at the top of the left sidebar; hidden entirely when the
       domain cannot be resolved (displayBreadcrumbs adds .hidden) so no
       gap remains. */
    display: flex;
    align-items: center;
    padding: 0 1.5rem 1.2rem;
    border-bottom: 1px solid var(--murkey-gray);
    margin-bottom: 1rem;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* Element spacing is explicit: the topic hash spaces itself like a
       normal space character on both sides (see the rule below). */
    gap: 0;
    padding: 0;
    font-size: 1.4rem;
}

/* The domain chip: the submit tray's context look — avatar followed by
   the domain's name — linking to the domain's page. */
.breadcrumbs__domain {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #f5a623;
    text-decoration: none;
    max-width: 24rem;
    transition: color 0.15s;
}

/* The global a:visited rule recolors visited links orange; the domain
   chip keeps its color. Declared before :hover so hover still wins. */
.breadcrumbs__domain:visited {
    color: #f5a623;
}

.breadcrumbs__domain:hover {
    color: #ffc04d;
}

.breadcrumbs__domain:hover .submit_post_tray__context_name {
    text-decoration: underline;
}

/* The standalone topic hash: a normal-space-width stand on both sides,
   outside both links. */
.breadcrumbs .submit_post_tray__context_topic_hash {
    margin: 0 0.3rem;
}

/* The topic marker beside the domain: the topic name linking to the
   topic post. */
.breadcrumbs__topic {
    display: inline-flex;
    align-items: center;
    color: #f5a623;
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumbs__topic:visited {
    color: #f5a623;
}

.breadcrumbs__topic:hover {
    color: #ffc04d;
}

.breadcrumbs__topic .submit_post_tray__context_topic {
    max-width: 20rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*********************************************************************************/
/**************************** END breadcrumb styles ******************************/
/*********************************************************************************/


/*********************************************************************************/
/**************************** create_community styles ****************************/
/*********************************************************************************/

/* Shared dark form control, matches the create_community inputs below */
.text-input {
    width: 100%;
    padding: 0.5em;
    background-color: rgb(35,35,45);
    border: none;
    border-radius: 0.5rem;
    color: white;
    outline: none;
    font: inherit;
}

textarea.text-input {
    resize: none;
    overflow: hidden;
    min-height: 8em;
}

.create_community__form_tray {
    padding: 1em;
    width: 100%;
    background-color: var(--murkey-gray);
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.create_community__title_input {
    padding: 0.5em;
    width: 100%;
    background-color: rgb(35,35,45);
    border: none;
    border-radius: 0.5rem;
    color: white;
    outline: none;
    font: inherit;
}

.create_community__textarea {
    padding: 0.5em;
    overflow: hidden;
    width: 100%;
    min-height: 8em;
    resize: none;
    background-color: rgb(35,35,45);
    border: none;
    border-radius: 0.5rem;
    color: white;
    outline: none;
    font: inherit;
}

.create_community__buttons_bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.create_community__submit_button {
    color: white;
    padding: .5em;
    background-color: #c50;
    min-width: 15em;
    border-radius: 1rem;
    text-align: center;
    font-weight: 550;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.create_community__submit_button:hover {
    background-color: #d61;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.create_community__submit_button.create_community__disabled {
    background-color: #555;
}

/* Private community toggle switch */
.create_community__private_toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    cursor: pointer;
    user-select: none;
}

.create_community__private_toggle input {
    display: none;
}

.create_community__toggle_slider {
    position: relative;
    flex-shrink: 0;
    width: 2.75rem;
    height: 1.5rem;
    background-color: rgb(35,35,45);
    border-radius: 1rem;
    transition: background-color 0.2s;
}

.create_community__toggle_slider::after {
    content: "";
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.create_community__private_toggle input:checked + .create_community__toggle_slider {
    background-color: #c50;
}

.create_community__private_toggle input:checked + .create_community__toggle_slider::after {
    transform: translateX(1.25rem);
}

/* Member picker: chips + predictive dropdown */
.member_picker {
    position: relative;
}

.member_picker__box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5em;
    background-color: rgb(35,35,45);
    border-radius: 0.5rem;
}

.member_picker__box:focus-within {
    box-shadow: 0 0 0 2px #c50;
}

.member_picker__chips {
    display: contents;
}

.member_picker__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0.6rem;
    background-color: #c50;
    color: white;
    border-radius: 1rem;
    font-size: 0.9em;
}

.member_picker__chip_remove {
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.member_picker__chip_remove:hover {
    color: #222;
}

.member_picker__chip_owner {
    background-color: var(--murkey-gray-highlight);
}

.member_picker__box input {
    flex: 1;
    min-width: 8em;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font: inherit;
}

.member_picker__dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    max-height: 15em;
    overflow-y: auto;
    background-color: rgb(45,45,58);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 10;
}

.member_picker__dropdown_item {
    padding: 0.5em 0.75em;
    color: white;
    cursor: pointer;
}

.member_picker__dropdown_item:hover {
    background-color: #c50;
}

/* Chip avatars (new chat modal picks) and dropdown rows with user identity */
.member_picker__chip_avatar {
    width: 1.3rem;
    height: 1.3rem;
    font-size: 0.6rem;
    flex: none;
}

.member_picker__dropdown_item_user {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

.member_picker__row_avatar {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.8rem;
    flex: none;
}

.member_picker__row_names {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.member_picker__row_name {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member_picker__row_handle {
    font-size: 85%;
    color: #a1a1aa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member_picker__dropdown_hint {
    padding: 0.6em 0.75em;
    color: #a1a1aa;
    font-size: 90%;
}

/* Keyboard highlight (mirrors :hover so arrows and mouse stay in sync) */
.member_picker__dropdown_item_active {
    background-color: #c50;
}

/*********************************************************************************/
/***************************** new chat modal styles *****************************/
/*********************************************************************************/

/* Comfortable variant of the login modal shell */
.new_chat_modal {
    width: 40rem;
    padding: 3rem;
    gap: 1.2rem;
    align-items: stretch;
    text-align: left;
}

.new_chat_modal__close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 2rem;
    height: 2rem;
    padding: 0.4rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.new_chat_modal__close svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: white;
}

.new_chat_modal__close:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.new_chat_modal__header {
    font-size: 150%;
    font-weight: 700;
    padding-right: 2.5rem;
}

.new_chat_modal__prompt {
    color: #bbb;
    font-size: 90%;
    margin-top: -0.6rem;
}

.new_chat_modal__label {
    font-size: 80%;
    font-weight: 600;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.new_chat_modal__actions {
    display: flex;
    gap: 0.9rem;
    margin-top: 0.6rem;
}

.new_chat_modal__actions .login__login_button {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.new_chat_modal__actions button[disabled] {
    opacity: 0.6;
    cursor: default;
}

.new_chat_modal__button_ghost {
    flex: 1;
    padding: 0.5em;
    border-radius: 1rem;
    font-weight: 550;
    color: white;
    background: transparent;
    border: 1px solid #777;
    cursor: pointer;
    text-align: center;
}

.new_chat_modal__button_ghost:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/*********************************************************************************/
/************************** END create_community styles **************************/
/*********************************************************************************/

/*********************************************************************************/
/************************** User Display & Preferences styles ********************/
/*********************************************************************************/

/* User Avatar */
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 700;
    font-family: "Poppins", sans-serif;
    user-select: none;
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.user-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Rounded-square variant (communities/blogs), as opposed to round user avatars */
.user-avatar.avatar-square,
.avatar-square .user-avatar__img {
    border-radius: 22%;
}

/* Group (chat) avatar: several member avatars squeezed into the space of a
   single avatar. The wrapper takes the slot's size class; the cells fill
   their grid area edge-to-edge, so the container's rounding clips them. */
.group-avatar {
    display: grid;
    gap: 1px;
    background: #33333c;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.group-avatar-2 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr;
}

.group-avatar-3,
.group-avatar-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

/* Three members: the first spans the full top row, the other two split the bottom. */
.group-avatar-3 > .group-avatar__cell:first-child {
    grid-column: 1 / -1;
}

.group-avatar .group-avatar__cell {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.55em;
}

.group-avatar .group-avatar__cell .user-avatar__img {
    border-radius: 0;
}

/* Post Author display */
.post-header-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* Topic page title: pages of topic posts and their descendants open with
   the topic's name (hash icon prepended) above the author header row. */
.post-topic-title {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: bold;
    max-width: 100%;
    font-size: 200%;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.post-topic-title .submit_post_tray__context_topic_hash {
    font-size: 150%;
}

.post-topic-title .submit_post_tray__context_topic_hash svg {
    width: 1em;
    height: 1em;
}

.post-timestamp {
    font-weight: 400;
    font-size: 1.1rem;
    color: #a1a1aa;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 0.3rem;
}

.chat-message-editor {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1.5em;
    padding-right: 1.5em;
}

.chat-message-editor textarea {
    width: 100%;
}

.post-author {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    line-height: 1.25;
    min-width: 0;
}

.post-author__avatar {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
}

.post-author__names {
    display: flex;
    flex-direction: column;
}

.post-author__display-name {
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff;
}

.post-author__username {
    font-weight: 400;
    font-size: 1.3rem;
    color: #a1a1aa;
}

.post-author:hover .post-author__display-name {
    color: orange;
}

.post-author:hover .post-author__username {
    color: #e5e7eb;
}

.post-author:hover .post-author__avatar {
    opacity: 0.92;
}

/* Reply quote author */
.reply-quote__author {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.reply-quote__avatar {
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.reply-quote__names {
    display: flex;
    flex-direction: column;
}

.reply-quote__display-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: #f3f4f6;
}

.reply-quote__username {
    font-weight: 400;
    font-size: 1.1rem;
    color: #9ca3af;
}

/* Topnav User Greet & Dropdown */
.navbar-user-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
}

.navbar-usergreet {
    /* Text row metrics; --greet-row-gap keeps the stack and avatar in sync. */
    --greet-name-size: 15px;
    --greet-handle-size: 12px;
    --greet-row-gap: 1px;
    display: inline-flex;
    /* Size to the text stack, not the bar height (opt out of .topnav's
       align-items: stretch). */
    align-self: center;
    align-items: center;
    gap: 0.8rem;
    /* 4px vertical padding keeps the button no taller than a plain nav
       link (17px text + 14px padding), so the bar keeps its logged-out
       height. */
    padding: 4px 16px !important;
    text-align: left;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: 17px;
}

.navbar-usergreet__avatar {
    width: 3rem;
    height: 3rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Display name + caret row above the @handle, all to the right of the
   avatar. Row gap comes from --greet-row-gap so the stack and the avatar
   size stay in sync. */
.navbar-usergreet__names {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--greet-row-gap);
    min-width: 0;
}

.navbar-usergreet__top {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

/* Anchored to .navbar-usergreet: the bare `.topnav span` rule (0,1,1)
   out-ranks single-class selectors and would force white 17px centered
   text with 14px/16px padding onto these spans. line-height 1.2 keeps
   descenders (g, y, p, @) from being clipped by overflow: hidden. */
.navbar-usergreet .navbar-usergreet__display-name {
    font-weight: 700;
    color: #ffffff;
    padding: 0;
    margin: 0;
    font-size: var(--greet-name-size);
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.navbar-usergreet .navbar-usergreet__handle {
    color: #a1a1aa;
    padding: 0;
    margin: 0;
    font-size: var(--greet-handle-size);
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 16rem;
}

.navbar-usergreet__caret {
    font-size: 1.2rem;
    color: #a1a1aa;
    padding: 0 !important;
    /* Sits as a direct child of the button row: auto margin pushes it to
       the far right edge, vertically centered by the button. */
    margin-left: auto;
    /* Inherited `normal` (~1.5) gives the caret a ~25.5px line box that
       inflates the name row and dwarfs the avatar; pin it to 1. */
    line-height: 1;
    transition: transform 0.2s ease;
}

.navbar-usergreet[aria-expanded="true"] .navbar-usergreet__caret {
    transform: rotate(180deg);
}

.navbar-usergreet:hover .navbar-usergreet__display-name {
    color: black;
}

.navbar-usergreet:hover .navbar-usergreet__handle {
    color: black;
}

.navbar-usergreet:hover .navbar-usergreet__caret {
    color: black;
}

.navbar-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 18rem;
    background-color: rgb(25, 25, 35);
    border: 1px solid var(--murkey-gray);
    border-radius: 0.8rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.navbar-dropdown.hidden {
    display: none !important;
}

.navbar-dropdown__item {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.6rem;
    color: #f2f2f2;
    text-decoration: none;
    font-size: 1.4rem;
    font-family: inherit;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar-dropdown__item:hover {
    background-color: rgb(45, 45, 68);
    color: #ffffff;
}

.navbar-dropdown__item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Community Sidebar Member */
.community-sidebar__member_link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: inherit;
    line-height: 1.2;
}

.community-sidebar__member_avatar {
    width: 3rem;
    height: 3rem;
    font-size: 1.12rem;
}

.community-sidebar__member_names {
    display: flex;
    flex-direction: column;
}

.community-sidebar__member_display_name {
    font-weight: 700;
    font-size: 1.4rem;
    color: #e2e8f0;
}

.community-sidebar__member_username {
    font-weight: 400;
    font-size: 1.1rem;
    color: #94a3b8;
}

.community-sidebar__member_link:hover .community-sidebar__member_display_name {
    color: orange;
}

/* User page profile header */
.user-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.6rem;
    margin-bottom: 1.5rem;
}

.user-header__avatar {
    width: 6.4rem;
    height: 6.4rem;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.user-header__names {
    display: flex;
    flex-direction: column;
}

.user-header__display-name {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0 0 0.2rem 0;
    line-height: 1.1;
    color: #ffffff;
}

.user-header__username {
    font-size: 1.6rem;
    font-weight: 400;
    color: #a1a1aa;
}

/* Community page header (mirrors user-header, with a square avatar) */
.community-banner {
    margin-bottom: 1.4rem;
    border-radius: 1rem;
    background-color: var(--murkey-gray);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Community banners embed their avatar (pinned bottom-right), so they need
   room below for its protruding lower part. User banners have no embedded
   avatar and overlap it with the header via negative margin instead. */
.community-banner--overlay {
    position: relative;
    margin-bottom: 3.2rem;
}

.community-banner__img {
    width: 100%;
    aspect-ratio: 5 / 1;
    object-fit: cover;
    display: block;
    border-radius: 1rem;   /* rounded corners without clipping the avatar */
}

/* Edit-community page banner preview/controls */
.edit_community__banner_controls {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 0;
}

.edit_community__banner_controls .community-banner {
    width: 100%;
    max-width: 34rem;
    margin-bottom: 0;
}

/* Banner-less community header: avatar sits beside the title, sized to match
   the user profile avatar. */
.community-header__avatar {
    width: 6rem;
    height: 6rem;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* Banner overlay (communities only): the oversized square avatar is pinned
   to the banner's bottom-right corner (about 3/4 of it overlapping the
   banner) and a page-colored ring cuts it out of the image. The title is
   contained in the body wrapper along with the content, never with the
   avatar. Without a banner, the header keeps its plain avatar-only row. */
.community-banner__avatar {
    position: absolute;
    right: 1.5rem;
    bottom: -2.2rem;
    width: 8rem;
    height: 8rem;
    font-size: 3.2rem;
    box-shadow: 0 0 0 0.4rem rgb(25,25,30);
}

/* User profiles differentiate themselves: the round avatar overlaps the
   banner's bottom-LEFT edge (Mastodon-style), with the names inside the
   header below the avatar. */
.community-banner + .user-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: -6.6rem;
    padding-left: 1.5rem;
    position: relative;
}

.community-banner + .user-header .user-header__avatar {
    width: 8.8rem;
    height: 8.8rem;
    font-size: 3.2rem;
    box-shadow: 0 0 0 0.4rem rgb(25,25,30);
}

.community-banner + .user-header .user-header__names {
    margin-left: -1.5rem;
}

/* Titles live in the same wrapper as the content; keep them separated from it. */
.community-body > .community-header__names {
    margin-bottom: 1.2rem;
}

.community-header__names {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.community-header__title {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.community-header__lock {
    display: inline-flex;
    color: #a1a1aa;
}

.community-header__lock svg {
    width: 2.2rem;
    height: 2.2rem;
    fill: currentColor;
}

/* Preferences Page */
.preferences__form_tray {
    padding: 1.5em;
    width: 100%;
    background-color: var(--murkey-gray);
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preferences__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.preferences__label {
    font-weight: 600;
    font-size: 1.4rem;
    color: #f3f4f6;
}

.preferences__hint {
    font-size: 1.2rem;
    color: #a1a1aa;
}

.preferences__input_disabled {
    background-color: rgb(28, 28, 36);
    color: #888888;
    cursor: not-allowed;
}

.preferences__preview_card {
    background-color: rgb(30, 30, 40);
    border-radius: 0.8rem;
    padding: 1rem 1.2rem;
    border: 1px solid #3f3f46;
    margin-top: 0.5rem;
}

.preferences__preview_header {
    font-size: 1.2rem;
    color: #9ca3af;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preferences__preview_author {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    line-height: 1.25;
}

.preferences__avatar_upload_container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.preferences__avatar_current {
    width: 6.4rem;
    height: 6.4rem;
    font-size: 2.2rem;
    flex-shrink: 0;
}

.preferences__avatar_controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

.preferences__avatar_buttons_row {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    align-items: center;
}

.preferences__avatar_button {
    cursor: pointer;
    padding: 0.8rem 1.6rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.preferences__avatar_button_remove {
    background-color: #dc2626 !important;
    border: none;
    color: white;
}

.preferences__avatar_button_remove:hover {
    background-color: #b91c1c !important;
}

.preferences__preview_avatar {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
}

.preferences__preview_names {
    display: flex;
    flex-direction: column;
}

.preferences__preview_display_name {
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff;
}

.preferences__preview_username {
    font-weight: 400;
    font-size: 1.3rem;
    color: #a1a1aa;
}

/************************ topic tabs styles *****************************/
.topic-tabs__topline {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin-top: 1.5rem;
}

.topic-tabs {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 0.0rem;
    padding-top: 0.0rem;
}

.topic-tabs__tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.topic-tabs__tab:visited {
    color: #888;
}

.topic-tabs__tab:hover {
    color: #fff;
}


.topic-tabs__tab--active {
    color: #fff;
    border-bottom: 2px solid orange;
}

.topic-tabs__tab.topic-tabs__tab--active {
    color: #fff;
    border-bottom: 2px solid orange;
}

.topic-tabs__divider {
    width: 1px;
    height: 1.6rem;
    background-color: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

/************************ post community path styles *****************************/
/* The per-post breadcrumb line, in the submit tray's context look: the
   domain's avatar + name followed by the "#topic" marker when the post
   lives in a topic. */
.post-community-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* Element spacing is explicit: the label keeps its lead-in gap and
       the topic hash is spaced like a normal space character on both
       sides (see the rules below). */
    gap: 0;
    font-size: 1.2rem;
    color: #a1a1aa;
    margin-top: 0.15rem;
    margin-bottom: 0.45rem;
    line-height: 1.4;
}

.post-community-path .submit_post_tray__context_avatar {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.75rem;
}

.post-community-path .submit_post_tray__context_name {
    max-width: 16rem;
    font-size: 1.2rem;
    /* The per-post line keeps the breadcrumb gray the tray context is
       too quiet to use; hover turns it orange like the old crumbs. */
    color: #a1a1aa;
}

.post-community-path__label {
    color: #a1a1aa;
    margin-right: 0.55rem;
}

/* The standalone topic hash: a normal-space-width stand on both sides,
   outside both links. */
.post-community-path .submit_post_tray__context_topic_hash {
    margin: 0 0.25rem;
}

.post-community-path__domain {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #a1a1aa;
    text-decoration: none;
    transition: color 0.15s;
}

/* The global a:visited rule recolors visited links orange; the per-post
   breadcrumbs stay gray. Declared before :hover so hover still wins. */
.post-community-path__domain:visited {
    color: #a1a1aa;
}

.post-community-path__domain:hover {
    color: orange;
}

.post-community-path__domain:hover .submit_post_tray__context_name {
    color: orange;
    text-decoration: underline;
}

.post-community-path__topic {
    display: inline-flex;
    align-items: center;
    color: #a1a1aa;
    text-decoration: none;
    transition: color 0.15s;
}

.post-community-path__topic:visited {
    color: #a1a1aa;
}

.post-community-path__topic:hover {
    color: orange;
}

.post-community-path__topic:hover .submit_post_tray__context_topic {
    text-decoration: underline;
}

.post-community-path__topic .submit_post_tray__context_topic {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Infinite-scroll feed footer: an invisible sentinel sits at the bottom
   of the feed; when it nears the viewport the next page loads, shown by
   the spinner. The status line reports the empty/end states. */
.feed-end {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 3.5rem;
    margin-top: 0.75rem;
}

.feed-end[hidden] {
    display: none;
}

.feed-end__sentinel {
    width: 100%;
    height: 1px;
}

.feed-end__status {
    margin: 0;
    color: #a1a1aa;
    font-size: 1.05rem;
    text-align: center;
}

.feed-end__spinner {
    width: 1.6rem;
    height: 1.6rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: feed_end_spin 0.8s linear infinite;
}

@keyframes feed_end_spin {
    to { transform: rotate(360deg); }
}

/************************ feed scope toggle styles *****************************/
/* Front-page only: switches the feed between "All domains" (every domain
   the account is registered on) and "This domain" (the apex main feed).
   Visual language matches the topic tabs. */
.feed-scope {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.feed-scope[hidden] {
    display: none;
}

.feed-scope__tab {
    padding: 0.45rem 1.4rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: #888;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.feed-scope__tab:hover {
    color: #fff;
}

.feed-scope__tab--active {
    color: #fff;
    border-bottom: 2px solid orange;
}

.feed-scope__divider {
    width: 1px;
    height: 1.4rem;
    background-color: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

/* Community invite landing page (community_invite.html) and domain
   landing page (join_domain.html): the card shows what a link leads to —
   avatar, title, privacy badge, host domain, description — plus the join
   actions. Grand, centered, Discord-style. */
.invite_card {
    margin: 3rem auto;
    max-width: 36rem;
    padding: 3rem;
    background: linear-gradient(180deg, rgb(52,52,74), var(--murkey-gray));
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 4px solid #c50;
    border-radius: 1.5rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    text-align: center;
}

.invite_card__state {
    padding: 2.5rem 0.5rem;
    text-align: center;
    color: #ccc;
    font-size: 1.2rem;
    line-height: 1.5;
}

.invite_card__state_error {
    color: #ff8f8f;
}

.invite_card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.invite_card__avatar {
    width: 6.5rem;
    height: 6.5rem;
    font-size: 2.2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.invite_card__names {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    align-items: center;
}

.invite_card__title_row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.invite_card__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    word-break: break-word;
}

.invite_card__badge {
    padding: 0.2rem 0.6rem;
    background-color: rgb(35,35,45);
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ddd;
    white-space: nowrap;
}

.invite_card__domain {
    color: #999;
    font-size: 1rem;
    word-break: break-all;
}

.invite_card__desc {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: center;
}

.invite_card__register {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: rgb(35,35,45);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
}

.invite_card__register_label {
    color: #bbb;
    font-size: 0.9rem;
}

.invite_card__input {
    width: 100%;
    padding: 0.5em;
    background-color: rgb(50,50,62);
    border: none;
    border-radius: 0.5rem;
    color: white;
    outline: none;
    font: inherit;
}

.invite_card__actions {
    margin-top: 1.75rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

/* Both actions share one anatomy so they line up perfectly; the primary
    uses the house style of create_community__submit_button (orange, hover
    highlight), the secondary a quiet ghost of the same size. */
.invite_card__actions button {
    flex: 1;
    min-height: 3.2rem;
    padding: 0.6em 1.5em;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 1rem;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s ease;
}

.invite_card__actions .standard-button {
    background-color: #c50;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.invite_card__actions .standard-button:hover {
    background-color: #d61;
}

.invite_card__actions .standard-button:active {
    background-color: #b40;
}

.invite_card__actions .legacy-button {
    background-color: rgb(35,35,45);
    border: 1px solid rgba(255,255,255,0.15);
    margin: 0;
}

.invite_card__actions .legacy-button:hover {
    background-color: var(--murkey-gray-highlight);
    padding: 0.6em 1.5em;
}

.invite_card__actions .legacy-button:active {
    background-color: rgb(28,28,38);
    padding: 0.6em 1.5em;
}

.invite_card__actions button:disabled {
    opacity: 0.6;
    cursor: default;
}

.subtle_hint {
    margin-top: 1rem;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

/* Invite link management (edit_community.html): create/selectors, and
   the per-link rows with copy + revoke controls. */
.invite_links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    background-color: rgb(35,35,45);
    border-radius: 0.75rem;
}

.invite_links__create {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.invite_links__select {
    padding: 0.5em;
    background-color: rgb(50,50,62);
    border: none;
    border-radius: 0.5rem;
    color: white;
    outline: none;
    font: inherit;
    flex: 1 1 9rem;
}

.invite_links__create_btn {
    flex: 0 0 auto;
}

.invite_links__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.invite_links__empty {
    color: #888;
    font-size: 0.9rem;
}

.invite_links__row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background-color: rgb(50,50,62);
    border-radius: 0.5rem;
}

.invite_links__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.invite_links__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.invite_links__code {
    font-family: monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    word-break: break-all;
}

.invite_links__meta {
    color: #999;
    font-size: 0.8rem;
}

.invite_links__meta_dead {
    color: #ff8f8f;
}

.invite_links__controls {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.invite_links__btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.8rem;
}

.invite_links__btn_revoke {
    color: #ff8f8f;
}

/* Per-invite user dropdown (edit_community.html): the profiles that
   joined through a link, listed under its row when expanded. */
.invite_links__users {
    padding: 0.6rem 0.8rem;
    background-color: rgb(35,35,45);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* The class's display: flex would defeat the hidden attribute's
   UA display: none — spell the collapsed state out explicitly. */
.invite_links__users[hidden] {
    display: none;
}

.invite_links__user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.invite_links__user_avatar {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.invite_links__user_names {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.invite_links__user_name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.invite_links__user_handle {
    color: #a1a1aa;
    font-size: 0.8rem;
    word-break: break-all;
}

.invite_links__user_when {
    margin-left: auto;
    color: #888;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Standalone domain invite-link management for every domain member. */
.domain_invites {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--murkey-gray);
    border-radius: 1rem;
    min-width: 0;
}

.domain_invites h1, .domain_invites h2, .domain_invites p {
    margin: 0;
}

.domain_invites h1 {
    font-size: 1.8rem;
    line-height: 1.3;
}

.domain_invites h2 {
    font-size: 1.15rem;
}

.domain_invites__back {
    align-self: flex-start;
    font-size: 0.95rem;
    text-decoration: none;
}

.domain_invites__form, .domain_invites__existing, .domain_invites__created {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
    background-color: rgb(35,35,45);
    border-radius: 0.75rem;
    margin-top: 1rem;
}

.domain_invites__created[hidden] {
    display: none;
}

.domain_invites__controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.domain_invites__controls label {
    display: flex;
    flex: 1 1 9rem;
    flex-direction: column;
    gap: 0.3rem;
    color: #ddd;
    font-size: 0.9rem;
}

.domain_invites__controls select {
    width: 100%;
}

.domain_invites__primary, .domain_invites__secondary {
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.domain_invites__primary {
    background-color: #c50;
    font-weight: 600;
}

.domain_invites__primary:hover:not(:disabled) {
    background-color: #d61;
}

.domain_invites__secondary {
    background-color: rgb(35,35,45);
    border: 1px solid #666;
}

.domain_invites__secondary:hover:not(:disabled) {
    background-color: #555;
}

.domain_invites__revoke {
    color: #ffadad;
}

.domain_invites button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.domain_invites__copy_row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.domain_invites__copy_row input {
    flex: 1 1 15rem;
    min-width: 0;
    padding: 0.5rem;
    background-color: rgb(50,50,62);
    border: 1px solid #666;
    border-radius: 0.5rem;
    color: white;
    font: inherit;
}

.domain_invites .invite_links__controls {
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .domain_invites {
        border-radius: 0;
        padding: 1rem;
    }
}

/* Domain roles on the edit-domain page. Keep the selected role and its
   members together; the user search opens only while adding someone. */
.domain_roles {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.2rem;
    background-color: rgb(35,35,45);
    border-radius: 0.75rem;
    min-width: 0;
}

.domain_roles[hidden], .domain_roles__detail[hidden], .domain_roles__results[hidden] {
    display: none;
}

.domain_roles__heading, .domain_roles__detail_header h3, .domain_roles p {
    margin: 0;
}

.domain_roles__heading {
    font-size: 1.4rem;
}

.domain_roles__create {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.domain_roles__create input, .domain_roles__picker input {
    flex: 1 1 13rem;
    min-width: 0;
    padding: 0.65rem 0.8rem;
    background-color: rgb(50,50,62);
    border: 1px solid #555562;
    border-radius: 0.5rem;
    color: white;
    font: inherit;
}

.domain_roles__create input:focus, .domain_roles__picker input:focus {
    outline: 2px solid #c50;
    outline-offset: 1px;
}

.domain_roles__create button {
    flex: 0 0 auto;
    padding: 0.55rem 0.9rem;
    background-color: #c50;
    border-radius: 0.5rem;
    cursor: pointer;
}

.domain_roles__create button:hover:not(:disabled) {
    background-color: #d61;
}

.domain_roles__create button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.domain_roles__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: #aaa;
}

.domain_roles__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid #555562;
    border-radius: 0.5rem;
    background-color: rgb(50,50,62);
    cursor: pointer;
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
}

.domain_roles__tab:hover, .domain_roles__tab:focus-visible {
    background-color: #454553;
}

.domain_roles__tab_active, .domain_roles__tab_active:hover {
    background-color: #753b0a;
    border-color: #c50;
}

.domain_roles__tab_count, .domain_roles__count {
    color: #aaa;
    font-size: 0.85rem;
    white-space: nowrap;
}

.domain_roles__tab_count {
    padding: 0.05rem 0.4rem;
    border-radius: 1rem;
    background: rgba(255,255,255,0.1);
}

.domain_roles__detail {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
    background-color: rgb(43,43,55);
    border-radius: 0.6rem;
    min-width: 0;
}

.domain_roles__detail_header {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.domain_roles__detail_header h3 {
    font-size: 1.15rem;
    overflow-wrap: anywhere;
}

.domain_roles__permissions_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.domain_roles__permissions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.domain_roles__permission {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    background-color: rgb(50,50,62);
    border-radius: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.domain_roles__permission:has(input:checked) {
    background-color: #563719;
}

.domain_roles__permission input {
    accent-color: #c50;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.domain_roles__members {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 16rem;
    overflow-y: auto;
}

.domain_roles__empty {
    color: #aaa;
    font-size: 0.9rem;
}

.domain_roles__member, .domain_roles__result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.45rem 0.6rem;
    min-width: 0;
}

.domain_roles__member {
    background-color: rgb(50,50,62);
    border-radius: 0.4rem;
}

.domain_roles__identity {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.domain_roles__avatar {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.domain_roles__names {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.domain_roles__name, .domain_roles__handle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.domain_roles__name {
    font-weight: 600;
    font-size: 0.95rem;
}

.domain_roles__handle {
    color: #aaa;
    font-size: 0.8rem;
}

.domain_roles__remove {
    color: #ffadad;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
}

.domain_roles__remove:hover, .domain_roles__remove:focus-visible {
    color: white;
    text-decoration: underline;
}

.domain_roles__remove:disabled {
    opacity: 0.5;
    cursor: wait;
}

.domain_roles__search_label {
    font-weight: 600;
    font-size: 0.95rem;
}

.domain_roles__picker {
    position: relative;
    display: flex;
}

.domain_roles__picker input {
    width: 100%;
}

.domain_roles__results {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    z-index: 10;
    padding: 0.4rem;
    max-height: 16rem;
    overflow-y: auto;
    background-color: rgb(50,50,62);
    border: 1px solid #666;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    color: #bbb;
    font-size: 0.9rem;
}

.domain_roles__result {
    width: 100%;
    border-radius: 0.35rem;
    text-align: left;
    cursor: pointer;
    color: white;
}

.domain_roles__result:hover:not(:disabled), .domain_roles__result:focus-visible {
    background-color: #75400e;
}

.domain_roles__result:disabled {
    opacity: 0.55;
    cursor: default;
}

.domain_roles__result_action {
    color: #ffae66;
    white-space: nowrap;
    font-size: 0.85rem;
}

/* Kick/ban rows reuse the result rows, with two action buttons. */
.domain_roles__modrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.3rem 0.4rem;
    border-radius: 0.35rem;
    color: white;
}

.domain_roles__modrow:hover {
    background-color: #454553;
}

.domain_roles__modactions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.domain_roles__modbtn {
    padding: 0.3rem 0.7rem;
    border: 1px solid #666;
    border-radius: 0.4rem;
    background-color: rgb(43,43,55);
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.domain_roles__modbtn:hover:not(:disabled), .domain_roles__modbtn:focus-visible {
    color: white;
    border-color: #aaa;
}

.domain_roles__modbtn_danger {
    color: #ff8f8f;
    border-color: #7a4444;
}

.domain_roles__modbtn_danger:hover:not(:disabled), .domain_roles__modbtn_danger:focus-visible {
    color: white;
    background-color: #7a3030;
    border-color: #ff8f8f;
}

.domain_roles__modbtn:disabled {
    opacity: 0.5;
    cursor: wait;
}

@media (max-width: 500px) {
    .domain_roles__create button {
        width: 100%;
    }

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