/**
 * bbPress and imported forum content.
 *
 * Loaded only on forum pages. Covers both the bbPress markup and the blocks the
 * importer produced from the old uCoz posts.
 */

/* ============ Imported post content ============ */
/* .tq-smiley lives in components.css: news and comments carry smileys too. */

/*
 * Styled on our own class, not bbPress's. Wearing .bbp-reply-content inherited
 * the plugin's stylesheet, whose #bbpress-forums div.bbp-reply-content pushes
 * the body 130px to the right to clear its floated author box - and an id
 * selector cannot be outranked by a class.
 */
/*
 * Quotes are built as a panel: a byline strip on top, the quoted text below.
 * The quote block stores its <cite> last, so the strip is put back on top with
 * flex order rather than by rewriting the stored markup of 356,766 quotes.
 */
.post-content blockquote {
    display: flex;
    flex-direction: column;
    margin: var(--space-s) 0;
    padding: 0;
    background: var(--color-surface-sunken);
    border: var(--border-thin) solid var(--color-border);
    border-left: 2px solid var(--color-border-accent);
    border-radius: 0;
}

.post-content blockquote p {
    margin: 0;
    padding: var(--space-2xs) var(--space-s);
    font-size: var(--text-s);
}

.post-content blockquote p + p {
    padding-top: 0;
}

.post-quote__by {
    order: -1;
    display: block;
    padding: var(--space-3xs) var(--space-s);
    background: var(--color-surface);
    border-bottom: var(--border-thin) solid var(--color-border);
    font-size: var(--text-3xs);
    font-style: normal;
}

/*
 * Spaced with a margin rather than a flex gap: the two parts sit in a <cite>,
 * and its display is not ours to rely on - the gap silently did nothing and the
 * label ran straight into the name.
 */
.post-quote__label {
    margin-inline-end: var(--space-2xs);
    color: var(--color-text-muted);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.post-quote__author {
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 700;
}

.post-quote__author:hover {
    color: var(--color-accent);
    text-decoration: none;
}

/*
 * The arrow to the post being quoted - uCoz had one, and the importer kept
 * the id it pointed at. Only quotes made with the button carry it, so the
 * byline has to read well both with the arrow and without: hence a margin on
 * the arrow rather than a gap on the line.
 */
.post-quote__source {
    display: inline-flex;
    margin-inline-start: var(--space-2xs);
    color: var(--color-text-muted);
    vertical-align: middle;
}

.post-quote__source:hover,
.post-quote__source:focus-visible {
    color: var(--color-accent);
}

/* Quotes nested inside quotes: 30 posts do this, and the panel has to stay
   readable rather than compounding its own background. */
.post-content blockquote blockquote {
    margin: var(--space-2xs) var(--space-s) var(--space-s);
    background: transparent;
}

/* ============ Forum rules page ============ */
/*
 * Fills the forum shell like every other block on these pages. The line length
 * is held back by padding rather than by a max-width on the card: a capped card
 * inside a full-width shell reads as an unfinished layout, and the padding
 * takes the worst off a very wide line without leaving the frame half empty.
 * The block classes come from Gutenberg - this is ordinary page content, not
 * markup the theme emits.
 */
.rules {
    padding: var(--space-l) var(--space-xl);
    background: var(--color-surface);
    border: var(--border-thin) solid var(--color-border);
    color: var(--color-text-reading);
    line-height: var(--leading-reading);
}

.rules > * {
    margin-block: 0 var(--space-s);
}

.rules > *:last-child {
    margin-bottom: 0;
}

.rules .wp-block-heading {
    margin-top: var(--space-l);
    color: var(--color-heading);
    font-size: var(--text-l);
    letter-spacing: var(--tracking-wide);
    line-height: var(--leading-snug);
    text-transform: uppercase;
}

.rules > .wp-block-heading:first-child {
    margin-top: 0;
}

.rules .wp-block-list {
    padding-inline-start: var(--space-m);
}

.rules .wp-block-list li {
    margin-bottom: var(--space-2xs);
}

.rules .wp-block-list li:last-child {
    margin-bottom: 0;
}

@media (max-width: 40rem) {
    .rules {
        padding: var(--space-s) var(--space-m);
    }
}

/* ============ Forum search ============ */
/*
 * Not `.forum-search`: bbPress puts `forum-search` on the <body> of this very
 * page, and the row's `display: flex` turned the whole page into a wrapping
 * flex row - on a phone wider than the screen.
 */
.fsearch__bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
}

/*
 * The field carries its own border here, unlike the one in the header: that
 * one sits inside a panel that draws the frame, this one stands on the page.
 */
.fsearch__input {
    flex: 1 1 18rem;
    min-width: 0;
    height: 44px;
    padding: 0 var(--space-s);
    background: var(--color-canvas-alt);
    border: var(--border-thin) solid var(--color-border);
    border-radius: var(--radius-m);
    color: var(--color-text);
}

.fsearch__input:focus-visible {
    border-color: var(--color-accent);
    outline: none;
}

.fsearch__submit {
    gap: var(--space-3xs);
    flex-shrink: 0;
    justify-content: center;
    width: var(--fsearch-submit);
    /* A square kept free before the button for the options toggle (below). */
    margin-left: calc(44px + var(--space-2xs));
}

/*
 * The advanced form: the field and button on top, the options folded under
 * them in a <details> that works without a script.
 */
/* No margin of its own: the forum shell spaces its children with a gap, and
   the two added up to an empty band above the count. */
.fsearch {
    /* The button's width, fixed, so the options toggle can stand just before it. */
    --fsearch-submit: 8rem;

    position: relative;
    display: grid;
    gap: var(--space-s);
}

.fsearch__scope {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs);
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-s);
}

.fsearch__scope-name {
    color: var(--color-text-strong);
}

.fsearch__scope-drop {
    display: inline-flex;
    padding: var(--space-3xs);
    border-radius: var(--radius-s);
    color: var(--color-text-muted);
}

.fsearch__scope-drop:hover,
.fsearch__scope-drop:focus-visible {
    background: var(--color-surface-hover);
    color: var(--color-accent);
}

/*
 * The options toggle is the <details>' summary, lifted out of the flow into
 * the search row just before the button; the button keeps a square free in
 * front of itself for it, and its width is fixed so the toggle knows where.
 */
.fsearch__toggle {
    position: absolute;
    top: 0;
    right: calc(var(--fsearch-submit) + var(--space-2xs));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-canvas-alt);
    border: var(--border-thin) solid var(--color-border);
    border-radius: var(--radius-m);
    color: var(--color-text-muted);
    cursor: pointer;
    list-style: none;
}

.fsearch__toggle::-webkit-details-marker {
    display: none;
}

.fsearch__toggle:hover,
.fsearch__more[open] .fsearch__toggle {
    border-color: var(--color-border-accent);
    color: var(--color-accent);
}

/* Options are set: a dot in the corner, seen while the panel is shut. */
.fsearch__toggle--on::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
}

/* Everything under the toggle: one column of rows, each spaced alike. A
   wrapper and not the <details> itself, which browsers do not lay out as grid. */
.fsearch__body {
    display: grid;
    gap: var(--space-m);
}

/* The forums in one box on the left, the options in a column on the right. */
@media (min-width: 48rem) {
    .fsearch__body--split {
        grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 1fr);
        column-gap: var(--space-l);
    }

    /*
     * The list is as tall as the options beside it. Size containment takes its
     * own length out of the row's sizing - otherwise the forty-odd forums set
     * the row's height - and the column then stretches it to the options'.
     */
    .fsearch__body--split .fsearch__forums {
        display: flex;
        flex-direction: column;
    }

    .fsearch__body--split .fsearch__list {
        flex: 1 1 0;
        min-height: 12rem;
        max-height: none;
        contain: size;
    }
}

.fsearch__side {
    display: grid;
    gap: var(--space-s);
}

.fsearch__field {
    display: grid;
    gap: var(--space-3xs);
    min-width: 0;
}

/* One caption style for every option and the forums alike. */
.fsearch__label {
    margin-bottom: var(--space-3xs);
    padding: 0;
    color: var(--color-text-muted);
    font-size: var(--text-3xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.fsearch__titles {
    justify-self: start;
    margin-top: var(--space-2xs);
    font-size: var(--text-s);
}

/* A fieldset will not shrink below its content unless told (UA sheet). */
.fsearch__forums {
    display: grid;
    gap: var(--space-2xs);
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

/* The list: a box of its own height that scrolls, the board's order inside. */
.fsearch__list {
    max-height: 24rem;
    overflow-y: auto;
    background: var(--color-surface-sunken);
    border: var(--border-thin) solid var(--color-border);
    border-radius: var(--radius-m);
    overscroll-behavior: contain;
}

.fsearch__forum {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2xs);
    padding: var(--space-2xs) var(--space-s) var(--space-2xs) var(--space-l);
    color: var(--color-text);
    font-size: var(--text-s);
    line-height: var(--leading-snug);
    cursor: pointer;
}

.fsearch__forum:hover {
    background: var(--color-surface-hover);
}

.fsearch__forum .auth-form__checkbox {
    flex-shrink: 0;
    margin-top: 0.15em;
}

/* A category is a band across the box, the way the board heads its sections. */
.fsearch__forum--head {
    padding-left: var(--space-s);
    background: var(--color-surface);
    border-block: var(--border-thin) solid var(--color-border);
    color: var(--color-heading);
    font-weight: 700;
}

.fsearch__forum--head:first-child {
    border-top: 0;
}

.fsearch__forum--sub {
    padding-left: calc(var(--space-l) + var(--space-m));
}

.fsearch__count {
    display: grid;
    gap: var(--space-3xs);
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-s);
}

.fsearch__dropped {
    font-size: var(--text-xs);
}

.forum-head__link {
    color: inherit;
}

.forum-head__link:hover,
.forum-head__link:focus-visible {
    color: var(--color-accent);
    text-decoration: none;
}

/* ============ Search results ============ */
/*
 * One panel, the messages in it behind hairlines. Not `.search-list`: that is
 * the site search's own list, a framed panel too, and the two together drew
 * a frame around every card with a sliver of gap between them.
 */
.forum-hits {
    background: var(--color-surface);
    border: var(--border-thin) solid var(--color-border);
    border-radius: var(--radius-l);
    overflow: hidden;
}

/*
 * A hit is a card rather than a table row: the three result types carry
 * different amounts of metadata, and a grid of columns would leave a gap
 * wherever one of them has nothing to put in it.
 */
.search-hit {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-s);
    padding: var(--space-m) var(--space-l);
}

.search-hit + .search-hit {
    border-top: var(--border-thin) solid var(--color-border);
}

.search-hit:hover {
    background: var(--color-surface-hover);
}

.search-hit__portrait {
    width: 40px;
}

.search-hit__avatar {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-s);
}

.search-hit__body {
    min-width: 0;
}

.search-hit__title {
    margin: 0 0 var(--space-3xs);
    font-size: var(--text-m);
    line-height: var(--leading-snug);
}

/* The type of hit reads as a tag before the title rather than as a word in it,
   so a page of mixed results can be scanned by shape. */
.search-hit__kind {
    display: inline-block;
    margin-inline-end: var(--space-2xs);
    padding: 0 var(--space-3xs);
    border: var(--border-thin) solid var(--color-border-strong);
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-size: var(--text-3xs);
    font-weight: 400;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    vertical-align: middle;
}

.search-hit__link {
    color: var(--color-heading);
}

.search-hit__link:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.search-hit__meta {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
}

.search-hit__author {
    color: var(--color-text);
}

.search-hit__sep {
    margin: 0 var(--space-3xs);
    color: var(--color-border-strong);
}

.search-hit__excerpt {
    margin: var(--space-2xs) 0 0;
    color: var(--color-text-reading);
    font-size: var(--text-s);
    line-height: var(--leading-normal);
    overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
    .search-hit {
        grid-template-columns: 1fr;
        padding: var(--space-s) var(--space-m);
    }

    .search-hit__title {
        font-size: var(--text-s);
    }

    /* Three lines on a phone: the row says where the word is, the link the rest. */
    .search-hit__excerpt {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    /* The field gets the row; the button keeps its icon, the word stays for a screen reader. */
    .fsearch__input {
        flex-basis: 0;
    }

    .fsearch {
        --fsearch-submit: 44px;
    }

    .fsearch__submit {
        padding: 0;
    }

    .fsearch__submit span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .fsearch__list {
        max-height: 18rem;
    }

    .search-hit__portrait {
        display: none;
    }
}

/* ============ Poll (above a topic's opening post) ============ */
.poll {
    display: grid;
    gap: var(--space-xs);
    margin: 0 0 var(--space-m);
    padding: var(--space-s) var(--space-m);
    background: var(--color-surface-sunken);
    border: var(--border-thin) solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-m);
}

.poll__question {
    margin: 0;
    color: var(--color-heading);
    font-size: var(--text-l);
    line-height: var(--leading-snug);
}

.poll__status {
    margin: 0;
    color: var(--color-success);
    font-size: var(--text-xs);
}

.poll__status--error {
    color: var(--color-danger);
}

.poll__form {
    display: grid;
    gap: var(--space-xs);
}

.poll__options {
    display: grid;
    gap: var(--space-3xs);
    margin: 0;
    padding: 0;
    border: 0;
}

.poll__option {
    display: flex;
    align-items: baseline;
    gap: var(--space-2xs);
    padding: var(--space-3xs) 0;
    cursor: pointer;
}

.poll__input {
    flex: none;
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-accent);
    transform: translateY(0.15em);
}

.poll__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
}

.poll__more {
    display: grid;
    gap: var(--space-xs);
}

.poll__summary {
    color: var(--color-link);
    font-size: var(--text-xs);
    cursor: pointer;
}

.poll__more[open] > .poll__summary {
    margin-bottom: var(--space-xs);
}

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

.poll__item {
    display: grid;
    grid-template-columns: minmax(6rem, 16rem) 1fr auto;
    align-items: center;
    gap: var(--space-2xs);
    padding: var(--space-3xs) 0;
    font-size: var(--text-s);
}

.poll__mine {
    margin-left: var(--space-3xs);
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
}

.poll__bar {
    display: block;
    height: 0.6rem;
    background: var(--color-surface);
    border-radius: var(--radius-s);
    overflow: hidden;
}

.poll__fill {
    display: block;
    height: 100%;
    background: var(--color-text-muted);
}

.poll__item--mine .poll__fill {
    background: var(--color-accent);
}

.poll__count {
    font-size: var(--text-2xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.poll__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs) var(--space-s);
    padding-top: var(--space-2xs);
    border-top: var(--border-thin) solid var(--color-border);
    font-size: var(--text-2xs);
    color: var(--color-text-muted);
}

.poll__meta--closed {
    color: var(--color-text);
    font-weight: 700;
}

.poll__login {
    color: var(--color-link);
}

.poll__toggle {
    margin: 0 0 0 auto;
}

@media (max-width: 37.5rem) {
    .poll {
        padding: var(--space-s);
    }

    .poll__item {
        grid-template-columns: 1fr auto;
    }

    .poll__bar {
        grid-column: 1 / -1;
        order: 3;
    }
}

/* Poll fields of the topic form: folded under the editor until wanted. */
.post-form__poll {
    border-top: var(--border-thin) solid var(--color-border);
    padding-top: var(--space-s);
}

.post-form__poll-title {
    color: var(--color-link);
    font-size: var(--text-xs);
    cursor: pointer;
}

.post-form__poll-body {
    display: grid;
    gap: var(--space-s);
    margin-top: var(--space-s);
}

.post-form__row--short {
    max-width: 16rem;
}

.post-form__hint {
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
}

/* ============ Forum shell ============ */
/* Not `.forum`: bbPress puts that class on <body> of a forum's page, and a
   grid there broke the page's column (a phone page grew to 680px). */
.forum-shell {
    display: grid;
    gap: var(--space-m);
}

.forum-head {
    display: grid;
    gap: var(--space-2xs);
}

.forum-head__title {
    margin: 0;
    color: var(--color-heading);
    background-image: var(--gradient-heading);
    font-size: var(--text-2xl);
    line-height: var(--leading-snug);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .forum-head__title {
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.forum-head__text {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-s);
}

.forum-head__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.forum-head__sep {
    color: var(--color-border-strong);
}

.forum-notice {
    margin: 0;
    padding: var(--space-s) var(--space-m);
    background: var(--color-surface-sunken);
    border-left: 3px solid var(--color-border-strong);
    color: var(--color-text-muted);
    font-size: var(--text-s);
}

.forum-notice--closed {
    border-left-color: var(--color-accent);
}

/* A forum not everyone may read: the lock says so before the words do. */
.forum-notice--locked {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    border-left-color: var(--color-highlight);
}

.forum-notice--locked .icon {
    flex-shrink: 0;
    color: var(--color-highlight);
}

/* ============ Forum navigation ============ */
.forum-nav {
    margin-bottom: var(--space-m);
    border-bottom: var(--border-thin) solid var(--color-border);
}

.forum-nav__list {
    display: flex;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.forum-nav__link {
    display: inline-block;
    padding: var(--space-2xs) var(--space-xs);
    border-bottom: 2px solid transparent;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-size: var(--text-2xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    white-space: nowrap;
}

.forum-nav__link:hover {
    color: var(--color-text-strong);
    text-decoration: none;
}

.forum-nav__link--current {
    border-bottom-color: var(--color-accent);
    color: var(--color-accent);
}

/*
 * Wherever the strip is narrower than its entries (a phone, a tablet) it stays
 * one line and scrolls sideways: wrapped, it took two or three rows of loose
 * capitals above every page. On a wide screen it simply fits, and none of this shows.
 */
.forum-nav__list {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* For the script: entries' offsetLeft is measured from the list. */
    position: relative;
}

/*
 * A fade on the side that has more to swipe to, set by scroll-fade.js;
 * none at an end. The mask uses only alpha - the colour is irrelevant.
 */
.forum-nav__list--more-end {
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
}

.forum-nav__list--more-start {
    mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent);
}

.forum-nav__list--more-start.forum-nav__list--more-end {
    mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
}

.forum-nav__list::-webkit-scrollbar {
    display: none;
}

@media (max-width: 40rem) {
    .forum-nav__list {
        gap: 0;
    }

    .forum-nav__link {
        padding-inline: var(--space-2xs);
    }

    .breadcrumbs {
        font-size: var(--text-2xs);
    }

    .breadcrumbs__current {
        max-width: 20ch;
    }
}

/* ============ Forum and topic lists ============ */
/*
 * A category is a heading over its forums, not a row of its own. Its counters
 * were meaningless (nobody posts into a category) and its forums were buried a
 * level down as a run of links.
 */
.forum-group + .forum-group {
    margin-top: var(--space-l);
}

.forum-group__title {
    margin: 0 0 var(--space-2xs);
    color: var(--color-heading);
    background-image: var(--gradient-heading);
    font-size: var(--text-l);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .forum-group__title {
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.forum-group__link {
    color: inherit;
}

.forum-group__link:hover {
    color: var(--color-accent);
    text-decoration: none;
}

/* The gradient clips the link's own colour, so hover needs the fallback back. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
    .forum-group__title:hover {
        background-image: none;
        color: var(--color-accent);
    }
}

/*
 * One grid shared by the header strip and every row, so the columns line up
 * without the rows knowing anything about each other. The header is hidden on
 * narrow screens, where the rows stack and each number carries its own label.
 */
.forum-list,
.topic-list {
    border: var(--border-thin) solid var(--color-border);
    background: var(--color-surface);
}

.forum-list__head,
.topic-list__head,
.forum-row,
.topic-row {
    display: grid;
    align-items: center;
    gap: var(--space-s);
    padding: var(--space-s) var(--space-m);
}

.forum-list__head,
.forum-row {
    grid-template-columns: minmax(0, 1fr) 5rem 5rem 14rem;
}

.topic-list__head,
.topic-row {
    grid-template-columns: minmax(0, 1fr) 5rem 14rem;
}

.forum-list__head,
.topic-list__head {
    background: var(--color-surface-sunken);
    border-bottom: var(--border-thin) solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--text-3xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}

.forum-list__col--count,
.topic-list__col--count {
    text-align: center;
}

.forum-row + .forum-row,
.topic-row + .topic-row {
    border-top: var(--border-thin) solid var(--color-border);
}

.forum-row:hover,
.topic-row:hover {
    background: var(--color-surface-hover);
}

.forum-row__main,
.topic-row__main {
    min-width: 0;
}

.forum-row__title,
.topic-row__title {
    margin: 0;
    font-size: var(--text-m);
    line-height: var(--leading-snug);
}

.forum-row__link,
.topic-row__link {
    color: var(--color-text-strong);
}

/* Badge beside the name of a forum not everyone may read. */
.forum-lock {
    display: inline-flex;
    align-items: center;
    margin-left: var(--space-2xs);
    color: var(--color-text-muted);
    vertical-align: middle;
    cursor: help;
}

.forum-row__link:hover,
.topic-row__link:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.forum-row__mods {
    margin: var(--space-3xs) 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.forum-row__mods-label {
    font-weight: 700;
}

.forum-row__mod {
    color: var(--color-highlight);
}

.forum-row__mod[href]:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.forum-row__text,
.topic-row__meta {
    margin: var(--space-3xs) 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
}

.topic-row__author {
    color: var(--color-text);
}

.topic-row__sep {
    margin: 0 var(--space-3xs);
    color: var(--color-border-strong);
}

/* Shown only where a list mixes forums, so it stays quiet: it is context for
   the row, not a second thing to click on. */
.topic-row__forum {
    color: var(--color-text-muted);
}

.topic-row__forum:hover {
    color: var(--color-accent);
}

.forum-row__children {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    margin: var(--space-2xs) 0 0;
    font-size: var(--text-2xs);
}

.forum-row__child a {
    color: var(--color-text-muted);
}

.forum-row__child a:hover {
    color: var(--color-accent);
}

/* Flags sit inline with the title so a long title still wraps around them. */
.topic-row__flag {
    display: inline-block;
    margin-right: var(--space-2xs);
    padding: 0 var(--space-3xs);
    border: var(--border-thin) solid currentColor;
    color: var(--color-text-muted);
    font-size: var(--text-3xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    vertical-align: 0.15em;
}

.topic-row__flag--sticky {
    color: var(--color-accent);
}

.topic-row__flag--closed {
    color: var(--color-danger);
}

.forum-row__stat,
.topic-row__stat {
    display: grid;
    justify-items: center;
    gap: 2px;
}

.forum-row__number,
.topic-row__number {
    font-family: var(--font-heading);
    font-size: var(--text-l);
    color: var(--color-text);
}

.forum-row__label,
.topic-row__label {
    font-size: var(--text-3xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.forum-row__fresh,
.topic-row__fresh {
    display: grid;
    gap: 2px;
    min-width: 0;
    font-size: var(--text-2xs);
}

.forum-row__fresh-link,
.topic-row__fresh-link {
    overflow: hidden;
    color: var(--color-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-row__fresh-meta,
.topic-row__fresh-meta {
    color: var(--color-text-muted);
}

/* A tablet keeps the table, with narrower count and last-post columns. */
@media (max-width: 55rem) {
    .forum-list__head,
    .forum-row {
        grid-template-columns: minmax(0, 1fr) 4rem 4.5rem 12rem;
    }

    .topic-list__head,
    .topic-row {
        grid-template-columns: minmax(0, 1fr) 4.5rem 12rem;
    }
}

@media (max-width: 40rem) {
    .forum-list__head,
    .topic-list__head {
        display: none;
    }

    /* Counts stay in narrow columns right of the title, as on a table:
       stretched along a row of their own they read as loose words. */
    .forum-row,
    .topic-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: start;
        column-gap: var(--space-xs);
        row-gap: var(--space-2xs);
    }

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

    .forum-row__stat,
    .topic-row__stat {
        gap: 0;
        min-width: 2.75rem;
    }

    .forum-row__number,
    .topic-row__number {
        font-size: var(--text-m);
        line-height: var(--leading-snug);
    }

    .forum-row__fresh,
    .topic-row__fresh {
        grid-column: 1 / -1;
    }
}

/* On a phone the description and the last post are the longest things in a
   row and the least needed: the name and the counts say enough. */
@media (max-width: 40rem) {
    .forum-row__text,
    .forum-row__fresh,
    .topic-row__fresh {
        display: none;
    }
}

/*
 * The "last post" cell: a small portrait beside two lines of text. The avatar
 * is what makes the column scannable - a date on its own says nothing about who
 * was last in the room.
 */
.post-mini {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-2xs);
    text-align: left;
}

.post-mini__avatar {
    line-height: 0;
}

.post-mini__image {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-s);
    object-fit: cover;
}

.post-mini__body {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.post-mini__title {
    overflow: hidden;
    color: var(--color-text);
    font-size: var(--text-2xs);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-mini__title:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.post-mini__meta {
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: var(--text-3xs);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-mini__sep {
    color: var(--color-border-strong);
}

/* ============ A post in a topic ============ */
.post-list {
    display: grid;
    gap: var(--space-s);
}

.post {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    background: var(--color-surface);
    border: var(--border-thin) solid var(--color-border);
}

/*
 * A post that has been trashed, marked as spam or left pending.
 *
 * Only a moderator ever sees one: trashing sends them back to the topic with
 * `view=all`, which keeps such posts in the loop. Until this existed the post
 * came back looking exactly as it had, so a successful trash was indis-
 * tinguishable from a click that did nothing.
 */
.post--flagged {
    border-style: dashed;
    border-color: var(--color-border-strong);
}

/*
 * The body is toned down by colour rather than by `opacity`: opacity applies
 * to the whole group, so it would take the flag down with it and there is no
 * way for a child to opt out of its parent's.
 */
.post--flagged .post-content {
    color: var(--color-text-muted);
}

.post-head__flag {
    padding: 0 var(--space-2xs);
    border: var(--border-thin) solid var(--color-border-strong);
    border-radius: var(--radius-s);
    color: var(--color-text);
    font-family: var(--font-heading);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

/*
 * The author panel is a column of its own rather than a float, so a short post
 * never leaves the body text wrapping around the avatar. Its background is a
 * shade down from the post so the two read as separate areas without a border
 * doing the work.
 */
.post-author {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: var(--space-2xs);
    padding: var(--space-m) var(--space-s);
    background: var(--color-surface-sunken);
    border-right: var(--border-thin) solid var(--color-border);
    text-align: center;
}

.post-author__portrait {
    position: relative;
    display: block;
    line-height: 0;
}

/* Seen in the last quarter of an hour (User\Online). On the avatar rather
   than in the facts: it is the one thing on the card that is true right now. */
.post-author__dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--color-success);
    border: 2px solid var(--color-surface-sunken);
    border-radius: 50%;
}

.post-author__avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-s);
    object-fit: cover;
    transition: opacity var(--duration) var(--ease);
}

.post-author__portrait:hover .post-author__avatar {
    opacity: 0.8;
}

/* Name, group and platforms. On the wide card they are three rows of the
   column itself - the wrapper exists for the phone strip (see below). */
.post-author__id {
    display: contents;
}

.post-author__name {
    font-family: var(--font-heading);
    font-size: var(--text-m);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-accent);
    overflow-wrap: anywhere;
}

.post-author__name:hover {
    color: var(--color-accent-hover);
    text-decoration: none;
}

.post-author__name--guest {
    color: var(--color-text-muted);
}

.post-author__role {
    font-size: var(--text-3xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Where every other group is a rank, this one is a state: said in the colour
   of one, so it is not read as another title the member has earned. */
.post-author__role--blocked {
    color: var(--color-danger);
    font-weight: 700;
}

/* Who answers for the site, and who belongs to a guild: two quiet colours, so
   that an official answer is recognisable before it is read. */
.post-author__role--staff {
    color: var(--color-warning);
}

.post-author__role--guild {
    color: var(--color-accent);
}

.post-author__stats {
    display: grid;
    gap: 2px;
    width: 100%;
    margin: var(--space-2xs) 0 0;
    padding-top: var(--space-2xs);
    border-top: var(--border-thin) solid var(--color-border);
    font-size: var(--text-3xs);
}

.post-author__stat {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2xs);
}

.post-author__stat-label {
    color: var(--color-text-muted);
}

.post-author__stat-value {
    margin: 0;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

/* The numbers are doors: posts to the member's replies, reputation and
   warnings to their screens. Underlined on hover only - four underlined
   values would make the card look like a list of links. */
.post-author__stat-link {
    color: var(--color-text);
}

.post-author__warn-score {
    color: var(--color-warning);
    font-weight: 700;
}

.post-author__warn-score--clean {
    color: var(--color-text-muted);
    font-weight: inherit;
}

/* The same green as the dot on the avatar, so the two read as one fact. */
.post-author__now {
    color: var(--color-success);
}

.post-author__warn-score--blocked {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3xs);
    color: var(--color-danger);
    font-weight: 700;
}

/*
 * The address the post came from, under the author's card - where the old
 * forum printed it and where a moderator looks for it. Only a moderator is
 * ever handed one (see template-parts/forum/post.php), so it is set quietly:
 * it is a tool, not part of the conversation.
 */
.post-author__rep {
    margin: var(--space-3xs) 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

/* Under the facts: the card says who this is, then offers the one thing a
   reader can do about it. */
.post-author__write {
    margin: var(--space-2xs) 0 0;
}

.post-author__ip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xs);
    width: 100%;
    margin: var(--space-2xs) 0 0;
    padding-top: var(--space-2xs);
    border-top: var(--border-thin) solid var(--color-border);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: var(--text-3xs);
    overflow-wrap: anywhere;
}

/* Same flag as on the profile: emoji keep their own colour, and at body size
   they read as noise, so it goes up a notch and the row centres it. */
.post-author__flag {
    display: inline-flex;
    line-height: 1;
    cursor: help;
}

/*
 * A column, so the action row can be pushed to the bottom of the card however
 * short the post is. text-align is set explicitly: the author column beside it
 * is centred, and centring leaks into the body from bbPress's own stylesheet,
 * which left post text ragged down the middle of the card.
 */
.post-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: var(--space-s) var(--space-m) var(--space-m);
    text-align: start;
}

.post-head {
    display: flex;
    align-items: baseline;
    /* The anchor keeps the right edge itself, so a third item - the status
       flag - can sit beside the date instead of being spaced away from it. */
    justify-content: flex-start;
    gap: var(--space-s);
    padding-bottom: var(--space-2xs);
    margin-bottom: var(--space-s);
    border-bottom: var(--border-thin) solid var(--color-border);
    font-size: var(--text-2xs);
    color: var(--color-text-muted);
}

/*
 * The permalink for one post. Quiet until the post is hovered or the link is
 * focused: it has to be reachable on every post without a column of hash marks
 * pulling the eye down the page.
 */
.post-head__anchor {
    flex-shrink: 0;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    opacity: 0.45;
    transition: opacity var(--duration) var(--ease), color var(--duration) var(--ease);
}

.post:hover .post-head__anchor,
.post-head__anchor:focus-visible {
    opacity: 1;
}

.post-head__anchor {
    margin-inline-start: auto;
}

.post-head__anchor:hover {
    color: var(--color-accent);
    text-decoration: none;
}

/* The post body itself: set for reading, not for maximum contrast. */
.post-content {
    color: var(--color-text-reading);
    font-size: var(--text-m);
    line-height: var(--leading-reading);
    overflow-wrap: anywhere;
}

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

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

.post-content img {
    max-width: 100%;
    height: auto;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/*
 * "Ответ изменён ... пользователем ..." - bbPress appends this to the body of
 * every post that has been edited, as a <ul> of its own inside the content.
 * Left alone it read as another paragraph of the post, in the same size and
 * colour as what the member actually wrote.
 *
 * It is a footnote, so it is set like one: muted, small, italic and off to the
 * right, where it does not interrupt the reading column. No rule above it -
 * the signature and the actions row below it both carry one, and a third
 * would turn the foot of a post into a stack of bands. The
 * portrait bbPress puts in the sentence is taken out in PHP, not here; see
 * TQ\Forum\RevisionLog for why hiding it was not enough.
 */
.post-content .bbp-reply-revision-log,
.post-content .bbp-topic-revision-log {
    margin: var(--space-m) 0 0;
    padding: 0;
    list-style: none;
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
    font-style: italic;
    line-height: var(--leading-snug);
    text-align: right;
}

.post-content .bbp-reply-revision-log-item,
.post-content .bbp-topic-revision-log-item {
    margin: 0;
}

/* Underlined like every other link in a post body, just at this size. */
.post-content .bbp-reply-revision-log a,
.post-content .bbp-topic-revision-log a {
    color: var(--color-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content .bbp-reply-revision-log a:hover,
.post-content .bbp-topic-revision-log a:hover {
    color: var(--color-accent);
}

.post-signature {
    margin: var(--space-m) 0 var(--space-s);
    padding-top: var(--space-2xs);
    border-top: var(--border-thin) solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
    font-style: italic;
}

/*
 * Ruled off at the top: this is where the post ends and the controls begin,
 * and without the line they floated under the last paragraph as though they
 * were part of it. A post with a signature carries a second, lighter rule
 * further up, but the two are a paragraph apart and say different things -
 * one ends the member's words, this one ends the post.
 */
/*
 * Two groups, not one run of eight links: moderation behind a dots menu on
 * the left, and what the member came for - quote, reply - as buttons on the
 * right. The old row printed everything bbPress offers as text with middots,
 * which on a reply column read as a paragraph of links and wrapped into
 * three lines on a phone.
 */
.post-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    margin-top: auto;
    padding-top: var(--space-s);
    border-top: var(--border-thin) solid var(--color-border);
}

.post-actions__own {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    margin-inline-start: auto;
}

/*
 * The two member controls are buttons. bbPress prints the reply link itself
 * and puts its own class on it, so it is picked out of a string we do not
 * build - which is not the same thing as putting a plugin class on our own
 * markup.
 */
.post-actions__link--quote,
.post-actions .bbp-reply-to-link,
.post-actions .bbp-topic-reply-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3xs);
    padding: var(--space-3xs) var(--space-xs);
    border: var(--border-thin) solid var(--color-border-strong);
    border-radius: var(--radius-s);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: var(--text-3xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    white-space: nowrap;
}

.post-actions .bbp-reply-to-link,
.post-actions .bbp-topic-reply-link {
    background: var(--color-surface-raised);
    border-color: var(--color-border-accent);
    color: var(--color-heading);
}

.post-actions__link--quote:hover,
.post-actions__link--quote:focus-visible,
.post-actions .bbp-reply-to-link:hover,
.post-actions .bbp-topic-reply-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

/* Moderation: one quiet control that opens the rest. */
/*
 * The anchored post, after following a permalink. Warm grey, not the accent:
 * the accent is cream, and a full frame of it around a post reads as a white
 * box rather than as "this is the one you followed".
 */
.post:target {
    border-color: var(--color-border-accent);
}

@media (max-width: 48rem) {
    .post {
        grid-template-columns: 1fr;
    }

    /*
     * Stacked, the author panel becomes a strip above the post: portrait and
     * name side by side, stats inline, so it costs a couple of lines instead
     * of a full screen before the text starts.
     */
    .post-author {
        /* Portrait, who this is, and the one action - then everything else
           under them, all starting at the same left edge. The button goes in
           the first row because that row is as tall as the portrait and the
           space to the right of a short name is otherwise wasted. */
        grid-template-columns: auto minmax(0, 1fr) auto;
        justify-items: start;
        align-items: center;
        /* Name, role and counters are one block about the author here, not
           three rows of a column: they sit a line apart, not a gap apart. */
        row-gap: var(--space-2xs);
        column-gap: var(--space-s);
        padding: var(--space-s) var(--space-m);
        border-right: 0;
        border-bottom: var(--border-thin) solid var(--color-border);
        text-align: left;
    }

    /* Nothing in the strip places itself. Left to the auto-placement, the
       facts table took the narrow first column, set its width by its own, and
       the name was left wrapping a letter to the line. */
    .post-author__portrait {
        grid-column: 1;
        grid-row: 1;
    }

    .post-author__id {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    .post-author__write {
        grid-column: 3;
        grid-row: 1;
        margin: 0;
    }

    /* Under the portrait's row, indented to the name: the avatar's column is
       a margin here, not a place to start a line of text from. */
    .post-author__stats {
        grid-column: 2 / -1;
    }

    /* The address is a moderator's tool and it costs a whole line of the strip
       the author's card becomes here (tablet and phone alike); it is still in
       the profile. */
    .post-author__ip {
        display: none;
    }

    .post-author__avatar {
        width: 48px;
        height: 48px;
    }

    .post-author__stats {
        grid-auto-flow: column;
        justify-content: start;
        gap: var(--space-s);
        width: auto;
        margin: 0;
        padding-top: 0;
        border-top: 0;
    }

    .post-author__stat {
        gap: var(--space-3xs);
    }

    .post-body {
        padding: var(--space-s) var(--space-m) var(--space-m);
    }
}

/*
 * A phone: the post already sits inside the page's gutter, so its own padding
 * is halved, and the reading size drops a step - 16px in a 360px column ran
 * five words to the line.
 */
@media (max-width: 40rem) {
    .post-author {
        /* No third column: a phone is too narrow to hold a button beside the
           name, and an empty track would still cost its gap at the edge. */
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: var(--space-xs);
        padding: var(--space-xs) var(--space-s);
    }

    /* The button drops under the facts, still indented to the name. Its own
       padding is pulled back: the ghost button draws no border until it is
       hovered, so that padding read as the button standing a step in from the
       column every line above it starts at. */
    .post-author__write {
        grid-column: 2;
        grid-row: auto;
        margin-inline-start: calc(-1 * (var(--space-xs) + var(--border-thin)));
    }

    /* The card is a strip here, and four facts in a column were half its
       height. They lie down two to a line instead - a grid, not a wrapping
       line: wrapped, the second line broke wherever the first one ran out and
       the four facts stood at four different left edges. The tracks shrink to
       what is in them (minmax(0, auto)), so a long value wraps inside its own
       cell rather than pushing the column over. */
    .post-author__stats {
        display: grid;
        /* Back to rows: the wider layout above lays the same table out as one
           line (grid-auto-flow: column), and left standing it filled these two
           tracks downwards and opened two more - all four facts in one line,
           each squeezed to a couple of letters. */
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, auto));
        justify-content: start;
        gap: 2px var(--space-s);
    }

    .post-author__stat {
        justify-content: flex-start;
        gap: var(--space-3xs);
    }

    /* What a fact is called never breaks in half; its value may. */
    .post-author__stat-label {
        white-space: nowrap;
    }

    .post-body {
        padding: var(--space-xs) var(--space-s) var(--space-s);
    }

    .post-content {
        font-size: var(--text-s);
    }
}

/* ============ Pagination ============ */
.forum-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
    font-size: var(--text-2xs);
    color: var(--color-text-muted);
}

.forum-pagination__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3xs);
}

.forum-pagination__links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 var(--space-3xs);
    border: var(--border-thin) solid var(--color-border);
    color: var(--color-text);
    font-size: var(--text-2xs);
}

.forum-pagination__links .page-numbers:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.forum-pagination__links .page-numbers.current {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ============ Breadcrumbs (template-parts/forum/breadcrumbs.php) ============ */
.breadcrumbs {
    margin: 0 0 var(--space-s);
    font-size: var(--text-xs);
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-3xs) 0;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--color-text-muted);
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
}

.breadcrumbs__item + .breadcrumbs__item::before {
    content: '›';
    margin: 0 var(--space-2xs);
    color: var(--color-border-strong);
}

.breadcrumbs__link {
    color: var(--color-text-muted);
}

.breadcrumbs__link:hover,
.breadcrumbs__link:focus-visible {
    color: var(--color-accent);
}

/* A long topic title would push the trail to three lines; it is the heading below anyway. */
.breadcrumbs__current {
    max-width: 32ch;
    overflow: hidden;
    color: var(--color-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ Reply and topic form ============ */
.post-form {
    margin-top: var(--space-l);
    padding: var(--space-m);
    background: var(--color-surface);
    border: var(--border-thin) solid var(--color-border);
    border-radius: var(--radius-l);
}

.post-form__form {
    display: grid;
    gap: var(--space-s);
}

/* Tracks that never grow past the panel: the plain textarea bbPress prints
   (`cols="60"`, before the block editor replaces it) and the editor's own
   toolbars are wider than a phone, and an `auto` track takes their width. */
.post-form__form,
.post-form__body,
.post-form__row {
    grid-template-columns: minmax(0, 1fr);
}

.post-form__editor,
.post-form__editor .bbp-the-content {
    min-width: 0;
    max-width: 100%;
}

.post-form__editor .bbp-the-content {
    width: 100%;
}

.post-form__title {
    margin: 0;
    font-size: var(--text-s);
}

/*
 * The edit screens are a page whose whole content is this form, so its title
 * is the page's <h1> and is set like one. The panel loses its frame there for
 * the same reason: on its own page it is not a card inside anything, and the
 * editor below it already draws a box - two frames around one field of text
 * is what the page looked like before.
 */
.post-form--page {
    margin-top: var(--space-m);
    padding: 0;
    background: none;
    border: 0;
}

.post-form__title--page {
    color: var(--color-heading);
    background-image: var(--gradient-heading);
    font-size: var(--text-2xl);
    line-height: var(--leading-snug);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .post-form__title--page {
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.post-form__body {
    display: grid;
    gap: var(--space-s);
}

.post-form__row {
    display: grid;
    gap: var(--space-2xs);
    margin: 0;
}

.post-form__label {
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/*
 * The forum's own selects come from bbp_dropdown() and carry no class of
 * ours, so they are matched by where they sit rather than by name.
 */
.post-form__field,
.post-form__row select {
    width: 100%;
    background: var(--color-surface-sunken);
    border: var(--border-thin) solid var(--color-border);
    border-radius: var(--radius-m);
    color: var(--color-text);
    padding: var(--space-2xs) var(--space-xs);
}

.post-form__field:focus,
.post-form__row select:focus {
    border-color: var(--color-accent);
    outline: none;
}

.post-form__check {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
    cursor: pointer;
}

.post-form__checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-accent);
}

/*
 * The revision fields are a group, not a panel. They used to sit in a sunken
 * box of their own, which on the edit screen made a third frame inside the
 * form inside the page; a rule above them says the same thing with one line.
 */
.post-form__revision {
    display: grid;
    gap: var(--space-2xs);
    padding-top: var(--space-s);
    border-top: var(--border-thin) solid var(--color-border);
}

/*
 * The cancel link bbPress prints sits in the same row as Submit, so the row
 * is a flex line with the button pushed to the end rather than a block with
 * a floated button. The checkbox above it shares the row on anything wider
 * than a phone: on its own line it left a band of empty panel between the
 * editor and the button.
 */
/*
 * One gap, not two: on a phone the row wraps, the subscription line stands
 * above the button, and a row gap smaller than the gap over it made the
 * checkbox look stuck to the button.
 *
 * The bbPress class is gone from this wrapper on purpose: `div.bbp-submit-wrapper`
 * is (0,1,1) and carries `margin-top: 15px`, which beat our `margin: 0` and
 * added a second helping of air above the row. Nothing of the plugin's reads
 * that class - it is theirs to style, not ours to wear.
 */
.post-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-s);
    margin: 0;
}

/*
 * ...and the other helping: `#bbpress-forums div.bbp-the-content-wrapper`
 * carries `margin-bottom: 10px`. That wrapper is printed by bbp_the_content(),
 * so it cannot be taken off the markup - only out-weighed.
 */
#bbpress-forums .post-form__editor .bbp-the-content-wrapper {
    margin-bottom: 0;
}

/*
 * Whatever comes first in the row is pushed left and the buttons stay right.
 * That is the subscription checkbox on a new reply and the cancel link when
 * there is none, so neither needs naming.
 */
.post-form__actions > *:first-child {
    margin-inline-end: auto;
}

.post-form__actions a {
    color: var(--color-text-muted);
    font-size: var(--text-2xs);
}

.post-form__actions a:hover {
    color: var(--color-accent);
}

/* ============ Page titles on a phone ============ */
/* The size every heading of a page takes at this width (components.css). */
@media (max-width: 40rem) {
    .forum-head__title,
    .post-form__title--page {
        font-size: var(--text-xl);
    }
}
