/*
 * Forum (wpForo at /community/, task 17). Loaded with wpForo's own
 * stylesheet. wpForo's selectors start with #wpforo #wpforo-wrap, so rules
 * that must win use the same start.
 */

/* Content pages (Community, later Knowledge Centre, tools): light page
   background (Customizer palette colour 7) and white cards that need no
   borders. Set here because Blocksy's page background setting doesn't apply
   to the page wpForo takes over. */
body:has(#wpforo) {
    background-color: var(--theme-palette-color-7);
}

/* Card edge: a faint line (Stitch); set to transparent for cards without
   borders. */
#wpforo #wpforo-wrap {
    --storm-forum-card-border: color-mix(in srgb, var(--storm-ui-border) 70%, transparent);
}

/* wpForo paints its wrappers white (Settings → Styles, colour 1); they let
   the page background through, only the cards are white. */
#wpforo,
#wpforo #wpforo-wrap,
#wpforo #wpforo-wrap :is(.wpforo-main, .wpforo-content, .wpforo-right-sidebar, .wpfl-3.wpforo-section, .wpforo-recent-wrap, .wpforo-profile-content, .wpf-profile-section, .wpf-profile-body) {
    background: transparent;
}

/* The forum replaces the page content outside Blocksy's content area, so it
   spanned the whole window: give it the site's container width (Customizer →
   General → Layout), aligned with header and footer on every device. */
#wpforo {
    width: var(--theme-container-width, min(100%, 90vw));
    margin-inline: auto;
    padding-block: 2rem 4rem; /* the page's Blocksy vertical spacing is off */
}

/* Base: the site's fonts and text colour (Customizer); forum titles that
   wpForo prints as plain text get the heading font (functions.php passes it
   as --storm-forum-heading-font). */
#wpforo #wpforo-wrap {
    color: var(--theme-text-color);
    font-family: var(--theme-font-family, inherit);
}

#wpforo #wpforo-wrap :is(.cat-name, #wpforo-title, .wpforo-forum-title, .wpf-spost-title-link, .wpforo-last-topic-title > a, .widget-title) {
    font-family: var(--storm-forum-heading-font, inherit);
}

/* Forum menu bar (wpForo → Settings → Display Components → "Show Forum Menu
   Bar"; items: Appearance → Menus → "wpForo Navigation"): the tabs as a
   segmented control (light tray, the current tab filled navy), the search
   field on the right. */
#wpforo #wpforo-wrap #wpforo-menu#wpforo-menu { /* doubled: wpForo's colors.css loads later */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0;
    background: transparent;
    border: 0;
}

/* Tabs close to the title bar below them, so both read as one header. */
#wpforo #wpforo-wrap #wpforo-menu {
    margin-bottom: 0.75rem;
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-menu {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
}

#wpforo #wpforo-wrap #wpforo-menu #wpf-menu li.menu-item {
    background: transparent;
    border-bottom: 0; /* wpForo underlines its active item here */
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-menu > li > a {
    padding: 0.45rem 0.95rem;
    background: transparent;
    border: 0;
    border-radius: calc(var(--storm-ui-radius) - 3px);
    color: var(--theme-palette-color-4);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-menu > li > a:is(:hover, :focus-visible) {
    background: var(--storm-ui-surface);
    color: var(--storm-ui-primary);
}

/* Current tab: WordPress marks the menu item of the current address
   (current-menu-item), so Unanswered and Solved are recognised too; wpForo's
   own marker (wpforo-active) stays on "Recent" for every recent view, so it
   counts only when no item is current. */
#wpforo #wpforo-wrap #wpforo-menu .wpf-menu > li.current-menu-item > a,
#wpforo #wpforo-wrap #wpforo-menu .wpf-menu:not(:has(> li.current-menu-item)) > li.wpforo-active > a {
    background: var(--storm-ui-primary);
    color: var(--theme-palette-color-8, #fff);
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-search-form {
    position: relative;
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-search-form .fa-search {
    position: absolute;
    top: 50%;
    left: 1rem;
    z-index: 1;
    margin: 0;
    transform: translateY(-50%);
    color: var(--storm-ui-primary);
    font-size: 0.95rem;
    pointer-events: none;
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-search-field.wpf-search-field {
    min-width: 16rem;
    height: 2.75rem;
    margin: 0 !important; /* wpForo sets margin-right inline */
    padding: 0 1rem 0 3rem !important;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--storm-ui-primary) 8%, transparent);
    color: var(--storm-ui-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-search-field::placeholder {
    color: var(--theme-palette-color-5);
    opacity: 1;
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-search-field:hover {
    border-color: var(--storm-ui-border-hover);
}

#wpforo #wpforo-wrap #wpforo-menu .wpf-search-field:focus {
    border-color: var(--storm-ui-primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--storm-ui-primary) 18%, transparent);
}

/* Page layout (Stitch): the title bar across the full width; below it the
   forums (or a forum's questions) on the left and "Recent Discussions"
   (wpForo Sidebar widgets) on the right, top-aligned with the first card.
   wpForo nests the title bar inside the left column, so the wrappers in
   between are taken out of the box tree (display: contents) and their
   children placed on one grid. Rows have no gap (cards keep their own
   margins), so the sidebar can span the rows of the list. One column below
   1000 px (Blocksy's tablet width), "Recent Discussions" after the list. */
#wpforo #wpforo-wrap .wpforo-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

#wpforo #wpforo-wrap .wpforo-main > .wpforo-content,
#wpforo #wpforo-wrap .wpforo-main > .wpforo-content > .wpfl-3.wpforo-section:has(> .wpforo-category) {
    display: contents;
}

#wpforo #wpforo-wrap .wpforo-main > .wpf-clear,
#wpforo #wpforo-wrap .wpforo-main .wpf-subforum-sep { /* an empty spacer row */
    display: none;
}

#wpforo #wpforo-wrap .wpforo-main > .wpforo-right-sidebar {
    float: none;
    width: auto;
    margin: 1.5rem 0 0;
    padding: 0;
}

@media (min-width: 1000px) {
    #wpforo #wpforo-wrap .wpforo-main {
        grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
        column-gap: 1.5rem;
    }

    #wpforo #wpforo-wrap .wpforo-main :is(.wpforo-category, .wpf-head-bar) {
        grid-row: 1;
        grid-column: 1 / -1;
    }

    #wpforo #wpforo-wrap .wpforo-main > .wpforo-content > *:not(.wpforo-category, .wpf-head-bar, #wpforo-title),
    #wpforo #wpforo-wrap .wpforo-main .wpforo-section:has(> .wpforo-category) > *:not(.wpforo-category) {
        grid-column: 1;
    }

    #wpforo #wpforo-wrap .wpforo-main > .wpforo-right-sidebar {
        grid-column: 2;
        grid-row: 2 / span 40;
        margin: 0;
    }

    /* Pages without a full-width title bar (Recent, Unanswered, Solved: the
       title sits inside the list): the sidebar starts at the top. */
    #wpforo #wpforo-wrap .wpforo-main:not(:has(.wpforo-category, .wpforo-content > .wpf-head-bar)) > .wpforo-right-sidebar {
        grid-row: 1 / span 40;
    }

    /* Nothing to show beside the list yet (no topics): full width. */
    #wpforo #wpforo-wrap .wpforo-main:not(:has(.wpforo-right-sidebar li)) {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Forum home: wpForo prints the board title (wpForo → Boards → Title) as the
   page's H1, with an "Unread Posts" link inside it (template, no setting).
   The H1 stays for screen readers and search engines; the category bar below
   is the visible heading. RSS links: off in wpForo → Settings → RSS. */
#wpforo #wpforo-wrap.wpft-forum .wpforo-content > #wpforo-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#wpforo #wpforo-wrap.wpft-forum .wpforo-content > #wpforo-title .wpforo-feed {
    display: none;
}

/* Buttons ("Ask a question", "Answer", "Save"…): the site's buttons — shape,
   size, font and colours from Customizer → Buttons (Blocksy's variables).
   Secondary buttons stay outlined. wpForo's colours.css styles the category
   button white with a !important text colour and sets small paddings, hence
   the doubled class and the !important on colour and padding. */
#wpforo #wpforo-wrap .wpf-button.wpf-button:not(.wpf-button-secondary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: auto;
    min-height: var(--theme-button-min-height, 44px);
    padding: var(--theme-button-padding, 5px 20px) !important;
    background: var(--theme-button-background-initial-color);
    border: 0;
    border-radius: var(--theme-button-border-radius, 4px);
    box-shadow: none;
    color: var(--theme-button-text-initial-color) !important;
    font-family: var(--theme-font-family, inherit);
    font-size: var(--theme-button-font-size, 15px);
    font-weight: var(--theme-button-font-weight, 500);
    line-height: 1.6;
    text-transform: var(--theme-button-text-transform, none);
    transition: background-color 0.15s ease;
}

#wpforo #wpforo-wrap .wpf-button.wpf-button:not(.wpf-button-secondary):is(:hover, :focus-visible) {
    background: var(--theme-button-background-hover-color);
    color: var(--theme-button-text-hover-color, var(--theme-button-text-initial-color)) !important;
}

#wpforo #wpforo-wrap .wpf-button.wpf-button:not(.wpf-button-secondary) i {
    color: inherit;
}

/* "Ask a question" while its form is open shows only a close icon; without
   wpForo's icon margin (meant for icon + text) it sits in the centre. */
#wpforo #wpforo-wrap .wpf-button.wpf-button i.fa-times {
    margin: 0;
}

/* Secondary buttons ("Cancel"): same size and shape as the primary button,
   outlined. wpForo's colors.css sets them with !important. */
#wpforo #wpforo-wrap .wpf-button-secondary.wpf-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: auto;
    min-height: var(--theme-button-min-height, 44px);
    margin: 0 0.5rem;
    padding: var(--theme-button-padding, 5px 20px) !important;
    background: transparent !important;
    border: 1px solid var(--theme-button-background-initial-color) !important;
    border-radius: var(--theme-button-border-radius, 4px);
    color: var(--theme-button-background-initial-color) !important;
    font-family: var(--theme-font-family, inherit);
    font-size: var(--theme-button-font-size, 15px);
    font-weight: var(--theme-button-font-weight, 500);
    line-height: 1.6;
    opacity: 1;
    vertical-align: middle;
}

#wpforo #wpforo-wrap .wpf-button-secondary.wpf-button-secondary:is(:hover, :focus-visible) {
    background: color-mix(in srgb, var(--theme-button-background-initial-color) 8%, transparent) !important;
}

/* Marking the solution: the tick only for who may use it (storm-core adds
   storm-can-mark-solution to .wpforo-main); a reply already marked keeps
   its tick as a sign, not as a button. */
#wpforo #wpforo-wrap .wpforo-main:not(.storm-can-mark-solution) .wpf-toggle-not-answer {
    display: none;
}

#wpforo #wpforo-wrap .wpforo-main:not(.storm-can-mark-solution) .wpf-toggle-answer {
    cursor: default;
    pointer-events: none;
}

/* No votes on one's own posts (storm-core refuses them too). wpForo marks
   the reader's own posts with data-isowner="1". */
#wpforo #wpforo-wrap .post-wrap[data-isowner="1"] :is(.wpforo-voteup, .wpforo-votedown) {
    visibility: hidden;
}

/* Names without a profile link: wpForo still prints them as <a> (no href),
   coloured like links. Plain text instead (storm-core turns the links off;
   administrators keep them). */
#wpforo #wpforo-wrap a:not([href]),
#wpforo #wpforo-wrap a:not([href]):hover {
    color: inherit;
    cursor: text;
    text-decoration: none;
}

/* Online dot next to names: not shown (no setting in wpForo). */
#wpforo #wpforo-wrap .wpf-pa-online {
    display: none;
}

/* Category bar (Q&A layout): a white card with a thin green accent on top,
   the title next to an icon tile (same tile as the forums) and the "Ask a
   question" button. */
#wpforo #wpforo-wrap .wpfl-3 .wpforo-category.wpforo-category {
    margin-bottom: 1.25rem;
    overflow: hidden;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-top: 3px solid var(--theme-palette-color-3);
    border-radius: var(--storm-ui-radius);
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-cat-panel {
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: transparent;
}

#wpforo #wpforo-wrap .wpfl-3 .cat-name {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--storm-ui-primary);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
}

#wpforo #wpforo-wrap .wpfl-3 .cat-name::before {
    content: "\f0c0" / ""; /* Font Awesome "users"; decorative */
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    background: color-mix(in srgb, var(--storm-ui-primary) 10%, transparent);
    font-family: "Font Awesome 7 Free";
    font-size: 1.1rem;
    font-weight: 900;
}

/* A forum's own page: the title bar as a white card (the coloured left edge
   is the forum's colour, set by wpForo), the question list in a card. */
#wpforo #wpforo-wrap .wpforo-content > .wpf-head-bar {
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--storm-ui-surface);
    border-top: 1px solid var(--storm-forum-card-border);
    border-right: 1px solid var(--storm-forum-card-border);
    border-bottom: 1px solid var(--storm-forum-card-border);
    border-left-width: 4px !important; /* colour inline from wpForo */
    border-radius: var(--storm-ui-radius);
}

/* Recent / Unanswered / Solved: the title bar like the category bar of the
   forum home (white card, green accent, icon tile), with an icon per view
   and the line storm-core prints under the title (.storm-forum-view-intro).
   Its view selector repeats the tabs and is hidden. Each view has its own
   accent from the Interreg set (the forum home keeps green): Recent blue,
   Unanswered coral, Solved teal — the edge in the accent, the icon in its
   darker text version. */
#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar {
    --storm-view-accent: var(--storm-accent-blue);
    --storm-view-ink: var(--storm-accent-blue);
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    align-items: center;
    column-gap: 0.9rem;
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-top: 3px solid var(--storm-view-accent);
    border-radius: var(--storm-ui-radius);
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar:has([data-view="no-replies"]) {
    --storm-view-accent: var(--storm-accent-coral);
    --storm-view-ink: var(--storm-text-coral);
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar:has([data-view="solved"]) {
    --storm-view-accent: var(--storm-accent-teal);
    --storm-view-ink: var(--storm-text-teal);
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar::before {
    content: "\f017" / ""; /* Font Awesome "clock" (Recent); decorative */
    display: grid;
    grid-row: 1 / span 2;
    align-self: start; /* stays at the top when the text wraps (phones) */
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    background: color-mix(in srgb, var(--storm-view-accent) 12%, transparent);
    color: var(--storm-view-ink);
    font-family: "Font Awesome 7 Free";
    font-size: 1.1rem;
    font-weight: 900;
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar:has([data-view="no-replies"])::before {
    content: "\f059" / ""; /* "circle-question" (Unanswered) */
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar:has([data-view="solved"])::before {
    content: "\f058" / ""; /* "circle-check" (Solved) */
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar :is(.wpf-head-top, .wpf-head-bottom) {
    grid-column: 2;
    margin: 0;
    padding: 0;
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar .wpf-head-top {
    align-items: center;
    gap: 0.75rem;
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar .wpf-head-bottom {
    height: auto;
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar .wpf-head-filter {
    display: none;
}

#wpforo #wpforo-wrap .wpf-pt-recent .wpf-head-bar #wpforo-title {
    margin: 0;
    padding: 0;
    color: var(--storm-ui-primary);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
}

#wpforo #wpforo-wrap .storm-forum-view-intro {
    margin: 0.2rem 0 0;
    color: var(--theme-palette-color-5);
    font-size: 0.95rem;
    line-height: 1.5;
}

#wpforo #wpforo-wrap .wpforo-content > .wpf-head-bar #wpforo-title {
    color: var(--storm-ui-primary);
    font-weight: 600;
}

#wpforo #wpforo-wrap .wpforo-content > .wpfl-3.wpforo-section:has(> .topic-wrap) {
    overflow: hidden;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
}

/* Inside the list card: the column heads and each question with the card's
   inner spacing, thin lines between them (wpForo's thick navy line under the
   heads replaced), the status tile kept inside the card. */
#wpforo #wpforo-wrap .wpfl-3 .wpforo-topic-head {
    margin: 0;
    padding: 0.7rem 1.25rem;
    background: var(--storm-ui-surface-muted);
    border-bottom: 1px solid var(--storm-ui-border);
    color: var(--theme-palette-color-5);
    font-size: 0.8rem;
}

#wpforo #wpforo-wrap .wpfl-3 .topic-wrap .wpforo-topic {
    align-items: center;
    padding: 1rem 1.25rem;
}

/* Avatars are off (wpForo → Settings → Members), but the empty column stays
   and pushes the titles right, unevenly on phones. */
#wpforo #wpforo-wrap .wpfl-3 .topic-wrap .wpforo-topic-avatar:not(:has(*)) {
    display: none;
}

#wpforo #wpforo-wrap .wpfl-3 .topic-wrap .wpforo-topic-details {
    flex: 1 1 auto;
    min-width: 0;
}

/* Column heads over their columns: the votes column and its head share one
   width, the "Topic" head takes the rest. */
#wpforo #wpforo-wrap .wpfl-3 :is(.wpforo-topic-head .head-stat, .topic-wrap .wpforo-topic-stat) {
    flex: 0 0 12rem;
    width: 12rem;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-topic-head .head-title {
    flex: 1 1 auto;
}

#wpforo #wpforo-wrap .wpfl-3 .topic-wrap + .topic-wrap {
    border-top: 1px solid var(--storm-ui-border);
}

#wpforo #wpforo-wrap .wpfl-3 .topic-wrap .wpforo-topic-status {
    flex: 0 0 auto;
    padding: 0;
}

/* Forums as cards. The icon tile takes the forum's colour (wpForo → Forums →
   "Forum Color", printed inline on the icon) as text and a light tint of it
   as background; wpForo's outlined circle is replaced. */
#wpforo #wpforo-wrap .wpfl-3 .forum-wrap {
    margin: 0 0 0.75rem;
    overflow: hidden;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#wpforo #wpforo-wrap .wpfl-3 .forum-wrap:hover {
    border-color: var(--storm-ui-border-hover);
    box-shadow: var(--storm-ui-shadow);
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum {
    align-items: center;
    padding: 1rem 1.25rem;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-icon > div {
    width: auto !important; /* wpForo sets the circle inline */
    height: auto !important;
    border: 0 !important;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-icon i {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    background: color-mix(in srgb, currentColor 12%, transparent);
    font-size: 1.2rem;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-title {
    margin: 0 0 0.2rem;
    font-size: 1.05rem;
    font-weight: 600;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-title a {
    color: var(--theme-palette-color-4);
    text-decoration: none;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-title a:is(:hover, :focus-visible) {
    color: var(--storm-ui-primary);
    text-decoration: underline;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-description {
    color: var(--theme-palette-color-5);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Counts on the right: quiet labels, strong numbers. */
#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-stat {
    color: var(--theme-palette-color-5);
    font-size: 0.8rem;
}

/* "Posts" (topics + replies + comments together) says little next to Topics
   and Replies: hidden. Third row of wpForo's counter block. */
#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-stat > .wpft-row:nth-child(3) {
    display: none;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-forum-stat .wpft-cell-right {
    color: var(--theme-palette-color-4);
    font-weight: 600;
}

/* Recent questions under a forum: a light band inside the card (one line
   above it; wpForo draws its own on the inner parts too). */
#wpforo #wpforo-wrap .wpfl-3 [class*="wpforo-last-topics-"] {
    background: var(--storm-ui-surface-muted);
    border-top: 1px solid var(--storm-ui-border);
}

#wpforo #wpforo-wrap .wpfl-3 [class*="wpforo-last-topics-"] > * {
    border-top: 0;
}

/* The band's questions: room to the card's edges, thin lines between. */
#wpforo #wpforo-wrap .wpfl-3 .wpforo-last-topics-list {
    padding: 0.25rem 1.25rem 0.25rem 0;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-last-topics-list li {
    padding: 0.75rem 0;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-last-topics-list li + li {
    border-top: 1px solid var(--storm-ui-border);
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-last-topic-status.wpforo-last-topic-status {
    margin: 0;
    padding: 0;
}

/* Topic status (solved, awaiting moderation…): a round tile in the status
   colour (wpForo's colour classes, set in Settings → Styles) instead of a
   framed square; the square check becomes a plain check. */
#wpforo #wpforo-wrap .wpforo-last-topic-status.wpforo-last-topic-status,
#wpforo #wpforo-wrap .wpforo-topic-status.wpforo-topic-status { /* doubled: colors.css draws a dotted frame */
    width: auto;
    height: auto;
    background: transparent;
    border: 0 !important; /* also wpForo's phone-width rule */
}

#wpforo #wpforo-wrap :is(.wpforo-last-topic-status, .wpforo-topic-status) i {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: color-mix(in srgb, currentColor 13%, transparent);
    font-size: 0.85rem;
}

#wpforo #wpforo-wrap .fa-square-check::before {
    content: "\f00c"; /* Font Awesome "check" */
}

/* Recent / Unanswered / Solved lists (a table in wpForo): each topic as a
   card; the intro line and the empty avatar column are not shown. */
#wpforo #wpforo-wrap .wpforo-recent-content > table {
    border-collapse: separate !important; /* inline style in wpForo */
    border-spacing: 0 0.6rem !important;
}

#wpforo #wpforo-wrap .wpforo-recent-content :is(tr.wpf-htr, tr.wpf-tr-sep, td.wpf-spost-avatar) {
    display: none;
}

/* wpForo's own line under the list. */
#wpforo #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content {
    border-bottom: 0;
}

/* .wpforo-recent-wrap: wpForo's padding rule is that specific. */
#wpforo #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-title {
    padding: 1rem 1.25rem;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#wpforo #wpforo-wrap .wpforo-recent-content tr.wpf-ttr:hover td.wpf-spost-title {
    border-color: var(--storm-ui-border-hover);
    box-shadow: var(--storm-ui-shadow);
}

#wpforo #wpforo-wrap .wpforo-recent-content .wpf-spost-title-link {
    color: var(--theme-palette-color-4);
    font-size: 1rem;
    font-weight: 600;
}

#wpforo #wpforo-wrap .wpforo-recent-content .wpf-spost-title > i {
    margin-inline-end: 0.4rem;
}

#wpforo #wpforo-wrap .wpforo-recent-content .wpf-spost-title p,
#wpforo #wpforo-wrap .wpforo-recent-content .wpf-spost-forum {
    margin: 0.3rem 0 0;
    color: var(--theme-palette-color-5);
    font-size: 0.8rem !important; /* inline size in wpForo */
}

#wpforo #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content div.wpf-spost-forum .wpf-spost-forum-label {
    display: none; /* "FORUM" before the forum name (wpForo's selector is this long) */
}

/* Search results: each result as a card like the Recent list (wpForo gives
   them no side padding, corners or frame). */
#wpforo #wpforo-wrap .wpforo-search-results .wpf-search-result-card {
    padding: 1rem 1.25rem;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#wpforo #wpforo-wrap .wpforo-search-results .wpf-search-result-card:hover {
    border-color: var(--storm-ui-border-hover);
    box-shadow: var(--storm-ui-shadow);
}

/* Unread (signed-in users only; wpForo adds the classes): a small navy dot
   before the title of a topic with new posts, and of a forum that has such
   topics. Replaces wpForo's bold, which our semi-bold titles hide. Navy, not
   green, because green already means "solved". */
#wpforo #wpforo-wrap :is(
    .wpf-unread-topic .wpforo-last-topic-title > a,
    .wpf-unread-topic a.wpforo-topic-title,
    .wpf-unread-topic a.wpf-spost-title-link,
    .wpf-unread-forum .wpforo-forum-title a
)::before {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.45rem;
    vertical-align: 0.12em;
    background: var(--storm-ui-primary);
    border-radius: 50%;
}

/* Technology tags (wpForo tag links → forum search): small navy-tinted pills,
   without wpForo's commas between them. */
#wpforo #wpforo-wrap .wpf-tags-text sep {
    display: none;
}

/* Technology tags (wpForo tag links → forum search): small navy-tinted pills. */
#wpforo #wpforo-wrap a[href*="wpfin=tag"] {
    display: inline-block;
    margin: 0.15rem 0.3rem 0.15rem 0;
    padding: 0.1rem 0.55rem;
    background: color-mix(in srgb, var(--storm-ui-primary) 9%, transparent);
    border: 0;
    border-radius: 999px;
    color: var(--storm-ui-primary);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
}

/* Topic page: topic head, question and replies as cards; the reply marked
   as the solution with a green edge; comments on a light band. */
#wpforo #wpforo-wrap .wpforo-post-head {
    margin-bottom: 1rem;
    padding: 0.9rem 1.1rem;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
}

#wpforo #wpforo-wrap .wpfl-3 .post-wrap {
    margin-bottom: 0.9rem;
    overflow: hidden;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border) !important; /* inline border-top:none on the 2nd post */
    border-radius: var(--storm-ui-radius);
}

#wpforo #wpforo-wrap .wpfl-3 .post-wrap:has(.wpf-toggle-answer) {
    border-color: var(--storm-text-green) !important;
    box-shadow: inset 3px 0 0 var(--storm-text-green);
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-comment {
    background: var(--storm-ui-surface-muted);
    border-radius: calc(var(--storm-ui-radius) - 3px);
}

#wpforo #wpforo-wrap .wpforo-topic-footer {
    background: transparent;
}

/* "Please log in or register" and similar boxes in the forum. */
#wpforo #wpforo-wrap .wpf-please-login {
    padding: 0.9rem 1.1rem;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
}

/* Forms: fields and boxes like the site's other forms; checkboxes and radio
   buttons in the brand colour. */
#wpforo #wpforo-wrap :is(input[type="text"], input[type="search"], input[type="email"], input[type="url"], textarea, select) {
    border: 1px solid var(--storm-ui-border);
    border-radius: var(--theme-button-border-radius, 4px);
}

#wpforo #wpforo-wrap :is(input[type="text"], input[type="search"], input[type="email"], input[type="url"], textarea, select):focus {
    border-color: var(--storm-ui-primary);
    outline: 2px solid color-mix(in srgb, var(--storm-ui-primary) 25%, transparent);
    outline-offset: 0;
}

#wpforo #wpforo-wrap :is(input[type="checkbox"], input[type="radio"]) {
    accent-color: var(--storm-ui-primary);
}

/* wpForo's messages ("Your topic is published.", errors): a white card with
   a coloured edge instead of a solid blue or red bar. */
#wpf-msg-box > p {
    padding: 0.85rem 1.1rem 0.85rem 1rem !important;
    background: var(--storm-ui-surface) !important;
    border: 1px solid var(--storm-ui-border);
    border-left: 4px solid var(--storm-ui-primary);
    border-radius: var(--storm-ui-radius);
    box-shadow: var(--storm-ui-shadow) !important;
    color: var(--theme-palette-color-4) !important;
    font-size: 0.9rem;
}

#wpf-msg-box > p.error {
    border-left-color: var(--storm-ui-danger);
}

#wpf-msg-box > p::before,
#wpf-msg-box > p::after {
    display: none !important; /* wpForo's speech-bubble arrow */
}

#wpf-msg-box a {
    color: var(--storm-ui-primary) !important;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-last-topic-title > a {
    color: var(--theme-palette-color-4);
    font-weight: 600;
}

#wpforo #wpforo-wrap .wpfl-3 .wpforo-last-topic-title > a:is(:hover, :focus-visible) {
    color: var(--storm-ui-primary);
}

/* Votes and answers: soft tiles without a frame. */
#wpforo #wpforo-wrap .wpfl-3 .wpf-tbox {
    background: var(--storm-ui-surface);
    border: 0;
    border-radius: 0.625rem;
}

/* "Recent Discussions" beside the list: one white card (Stitch) with the
   heading and the topics as rows divided by thin lines. */
#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics {
    padding: 1.1rem 1.25rem 0.5rem;
    background: var(--storm-ui-surface);
    border: 1px solid var(--storm-forum-card-border);
    border-radius: var(--storm-ui-radius);
}

/* While the forum has no topics the widget would show only its heading. */
#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics:not(:has(li)) {
    display: none;
}

#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics .widget-title {
    margin: 0 0 0.25rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid var(--storm-ui-border);
    color: var(--storm-ui-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics li .wpforo-list-item {
    padding: 0.75rem 0;
}

#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics li,
#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics li:last-child {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--storm-ui-border);
    border-radius: 0;
}

#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics li:last-child {
    border-bottom: 0;
}

#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics li a:is(:hover, :focus-visible) {
    color: var(--storm-ui-primary);
    text-decoration: underline;
}

#wpforo #wpforo-wrap .wpforo-right-sidebar .widget_wpforo_recent_topics li a {
    color: var(--theme-palette-color-4);
    font-weight: 600;
}

/* Question tags = Technology terms (storm-core ForumTags): wpForo's
   free-text tag field is replaced by the checkbox list below and ignored. */
#wpforo #wpforo-wrap .wpf-topic-tags {
    display: none;
}

#wpforo #wpforo-wrap .storm-forum-technologies {
    margin: 1rem 0;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid var(--storm-ui-border);
    border-radius: var(--storm-ui-radius);
}

#wpforo #wpforo-wrap .storm-forum-technologies legend {
    padding: 0 0.25rem;
    font-weight: 600;
}

#wpforo #wpforo-wrap .storm-forum-technologies__help {
    margin: 0 0 0.5rem;
    font-size: 0.875em;
}

#wpforo #wpforo-wrap .storm-forum-technologies__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

#wpforo #wpforo-wrap .storm-forum-technologies__option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

#wpforo #wpforo-wrap .storm-forum-technologies__option:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.6;
}
