:where(.board-section, .resources-section) {
    --board-sidebar-bg: transparent;
    --board-sidebar-fg: var(--theme-text);
    --board-sidebar-width: 280px;
    --board-sidebar-toggle-width: 19px;
    --board-layout-gap: 10px;
    --board-layout-divider-offset: 5px;
    --board-pagination-control-width: 72px;
    --board-font-size: var(--main-font-size);
    --board-small-font-size: var(--type-size-small);
    --board-line-height: var(--main-font-spacing);
    --board-content-line-height: var(--main-font-spacing);
    --board-content-small-font-size: 13px;
    --board-content-standard-font-size: 15px;
    --board-content-large-font-size: 17px;
    --board-space-1: 4px;
    --board-space-2: 8px;
    --board-space-3: 12px;
    --board-space-4: 16px;
}

.board-section {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin-bottom: calc(-1 * var(--main-padding-bottom));
    padding-bottom: 0;
    color: var(--theme-text, #000000);
    font-family: var(--body-font);
    font-size: var(--board-font-size);
    line-height: var(--board-line-height);
    letter-spacing: normal;
}

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

.board-layout {
    display: grid;
    grid-template-columns: var(--board-sidebar-width) minmax(0, 1fr);
    gap: var(--board-layout-gap);
    align-items: stretch;
    position: relative;
    min-width: 0;
    transition: grid-template-columns 180ms ease;
    flex: 1 0 auto;
}

.board-layout.is-sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
}

.board-layout.is-sidebar-collapsed .board-sidebar {
    display: none;
}

@media (min-width: 901px) {
    .board-layout::before {
        content: "";
        position: absolute;
        top: calc(var(--nav-box-height) + var(--nav-border-bottom-thk) - var(--main-padding-top));
        bottom: 0;
        left: calc(var(--board-sidebar-width) + var(--board-layout-divider-offset));
        width: 1px;
        background: var(--theme-divider-strong);
        pointer-events: none;
        transition: left 180ms ease;
    }

    .board-layout.is-sidebar-collapsed::before {
        left: var(--board-layout-divider-offset);
    }
}

.board-sidebar {
    grid-column: 1;
    align-self: stretch;
    margin-top: calc(var(--nav-box-height) + var(--nav-border-bottom-thk) - var(--main-padding-top));
    margin-left: calc(-1 * var(--main-padding-left));
    min-height: 100%;
    padding-block: var(--type-sidebar-shell-padding-block);
    padding-inline: var(--type-sidebar-shell-padding-inline);
    background: var(--board-sidebar-bg);
    color: var(--board-sidebar-fg);
}

.board-sidebar-toggle {
    box-sizing: border-box;
    position: absolute;
    z-index: 2;
    top: calc(var(--nav-box-height) + var(--nav-border-bottom-thk) - var(--main-padding-top));
    left: calc(
        var(--board-sidebar-width)
        + var(--board-layout-divider-offset)
        - var(--board-sidebar-toggle-width)
    );
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--board-sidebar-toggle-width);
    height: 72px;
    padding: var(--type-control-padding-tight);
    border: 0;
    border-radius: 0 0 4px 4px;
    background: var(--theme-sidebar-toggle-bg);
    color: var(--theme-text);
    cursor: pointer;
    font-family: var(--body-font);
    line-height: 1;
    transition: left 180ms ease, background-color 120ms ease;
}

.board-layout.is-sidebar-collapsed .board-sidebar-toggle {
    left: calc(var(--board-layout-divider-offset) - var(--board-sidebar-toggle-width));
    height: 82px;
}

.board-sidebar-toggle:hover,
.board-sidebar-toggle:focus-visible {
    background: var(--theme-sidebar-toggle-hover);
}

.board-sidebar-toggle:focus-visible {
    outline: 2px solid var(--theme-link, #0969da);
    outline-offset: 2px;
}

.board-sidebar-toggle-label {
    display: block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    font-size: calc(var(--nav-font-size) * 0.8);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
}

.board-channel-list {
    display: grid;
    gap: 0;
}

.board-channel-separator {
    width: auto;
    min-width: 0;
    margin: var(--type-space-tight) var(--type-control-padding-inline);
    border: 0;
    border-top: 1px solid var(--theme-divider-standard);
}

.board-channel-link {
    display: grid;
    grid-template-columns: 25.92px minmax(0, 1fr);
    column-gap: 6px;
    align-items: start;
    min-width: 0;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    font-size: var(--nav-font-size);
    line-height: 1.4;
    text-decoration: none;
}

.board-channel-link,
.board-channel-link:visited,
.board-channel-link:hover,
.board-channel-link:focus-visible {
    color: var(--theme-text);
}

.board-channel-link.is-active {
    background: transparent;
    color: var(--theme-text, #000000);
    font-weight: 700;
}

.board-channel-link.is-active :is(.board-channel-index, .board-channel-title) {
    color: inherit;
}

.board-channel-index {
    color: var(--board-sidebar-fg);
    white-space: nowrap;
}

.board-channel-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-main {
    grid-column: 2;
    box-sizing: border-box;
    min-width: 0;
    margin-top: calc(var(--nav-box-height) + var(--nav-border-bottom-thk) - var(--main-padding-top));
    margin-inline-start: calc(-1 * var(--board-layout-divider-offset));
    padding: var(--type-space-content);
}

.board-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: var(--board-space-3);
    min-height: 38px;
    padding: 0 0 6px;
    border-bottom: 1px solid var(--theme-divider-standard);
}

.board-header-copy {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 1;
    gap: 0;
    min-width: 0;
}

.board-detail-channel-header {
    position: relative;
}

.board-detail-channel-header .board-header-copy {
    padding-inline-end: 144px;
}

.board-header > .board-detail-view-actions {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
}

.board-header-copy h1 {
    margin: 0;
    color: var(--theme-text, #000000);
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.board-header-description {
    grid-column: 1;
    grid-row: 2;
    margin: var(--type-space-content) 0 0;
    color: var(--theme-text-muted, #555555);
    font-size: var(--type-size-content-description);
    line-height: var(--type-leading-reading);
}

.board-messages {
    margin: var(--type-space-compact) 0 0;
}

.board-message {
    margin: 0;
    padding: var(--type-space-compact);
    border-left: 3px solid var(--theme-text, #000000);
    background: var(--theme-surface-muted, #f6f8fa);
    font-size: var(--board-small-font-size);
}

.board-message.is-success {
    background: var(--theme-success-bg, #d9f4d1);
}

.board-permission-denied {
    margin: var(--type-space-content) 0 0;
    padding: var(--type-space-content);
    border: 1px solid var(--theme-divider-standard);
    border-radius: 6px;
    background: var(--theme-surface-muted);
}

.board-permission-denied h2 {
    margin: 0;
    color: var(--theme-text-strong);
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
}

.board-permission-denied p {
    margin: var(--type-space-peer) 0 0;
    color: var(--theme-text);
}

.board-composer-actions {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    gap: var(--type-space-tight);
    align-self: start;
    justify-self: end;
    margin-top: var(--type-space-content);
}

.board-composer {
    width: 96px;
    min-width: 88px;
    margin: 0;
}

.board-composer-summary {
    position: relative;
    box-sizing: border-box;
    display: inline-flex;
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    justify-content: center;
    align-self: start;
    justify-self: end;
    width: 96px;
    min-width: 88px;
    height: 26px;
    min-height: 0;
    margin-top: var(--type-space-content);
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-primary-action);
    border-radius: 4px;
    background: var(--theme-primary-action);
    color: var(--theme-primary-action-text);
    cursor: pointer;
    list-style: none;
}

.board-composer .board-composer-summary {
    width: 100%;
    min-width: 100%;
    margin-top: 0;
}

.board-composer-cancel,
.board-composer-cancel:visited {
    box-sizing: border-box;
    display: none;
    align-items: center;
    justify-content: center;
    width: 96px;
    min-width: 88px;
    height: 26px;
    min-height: 0;
    margin: 0;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-text-subtle);
    border-radius: 4px;
    background: var(--theme-secondary-button-bg);
    color: var(--theme-text-strong);
    font-size: var(--board-small-font-size);
    font-weight: 600;
    line-height: var(--type-leading-ui);
    text-decoration: none;
    white-space: nowrap;
}

.board-composer-actions:has(.board-composer[open]) .board-composer-cancel {
    display: inline-flex;
}

.board-composer-cancel:is(:hover, :focus-visible) {
    border-color: var(--theme-text-secondary);
    background: var(--theme-surface-hover);
    color: var(--theme-text-strong);
    text-decoration: none;
}

.board-composer-cancel:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-composer-summary > span:first-child > span,
.board-composer-summary-action {
    display: none;
}

.board-composer-summary strong {
    color: inherit;
    font-size: var(--board-small-font-size);
    font-weight: 600;
    line-height: 1.4;
}

.board-composer:not([open]) .when-open,
.board-composer[open] .when-closed {
    display: none;
}

.board-composer-summary:hover,
.board-composer[open] .board-composer-summary {
    border-color: var(--theme-primary-action-hover);
    background: var(--theme-primary-action-hover);
    color: var(--theme-primary-action-text);
    opacity: 1;
}

.board-composer-summary:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-login-write,
.board-login-write:hover {
    text-decoration: none;
}

/*
 * A logged-out Write a post control is an anchor so it can open the shared
 * login dialog.  It remains a primary button in every link state: the global
 * visited-link rule has greater specificity than a class-only selector.
 */
a.board-composer-summary:link,
a.board-composer-summary:visited,
a.board-composer-summary:hover,
a.board-composer-summary:visited:hover,
a.board-composer-summary:focus-visible,
a.board-composer-summary:visited:focus-visible,
a.board-composer-summary:active,
a.board-composer-summary:visited:active {
    color: var(--theme-primary-action-text);
    text-decoration: none;
}

.board-composer-summary::-webkit-details-marker {
    display: none;
}

.board-composer-summary > span:first-child {
    display: block;
    min-width: 0;
}

.board-composer-body {
    display: none;
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0;
    width: 100%;
    margin-top: var(--board-space-3);
    margin-bottom: var(--board-space-3);
    padding: var(--board-space-3);
    overflow: hidden;
    border: 1px solid var(--theme-border-soft, #d0d7de);
    border-radius: 8px;
    background: var(--theme-surface, #ffffff);
}

/* The disclosure control owns column two; its adjacent panel owns the full header row. */
.board-composer-actions:has(.board-composer[open]) + .board-composer-body {
    display: block;
}

.board-header:has(.board-composer[open]) {
    padding-bottom: 0;
}

.board-composer-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: var(--board-space-3);
}

.board-composer-heading h2 {
    margin: 0;
    color: var(--theme-text, #000000);
    font-size: var(--board-font-size);
    line-height: var(--board-line-height);
}

.board-composer-heading > span {
    color: var(--theme-text-muted, #555555);
    font-size: var(--board-small-font-size);
}

.board-composer-heading a {
    color: var(--theme-link, #0969da);
    font-size: var(--board-small-font-size);
}

.board-answer-actions {
    display: inline-flex;
    flex: 0 0 auto;
    gap: var(--type-space-tight);
}

.board-answer-actions :is(.board-answer-cancel, .board-answer-save) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    min-width: 88px;
    height: 26px;
    min-height: 0;
    margin: 0;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border-radius: 4px;
    font-size: var(--board-small-font-size);
    font-weight: 600;
    line-height: var(--type-leading-ui);
    text-decoration: none;
    white-space: nowrap;
}

.board-answer-cancel,
.board-answer-cancel:visited {
    border: 1px solid var(--theme-text-subtle);
    background: var(--theme-secondary-button-bg);
    color: var(--theme-text-strong);
}

.board-answer-cancel:is(:hover, :focus-visible) {
    border-color: var(--theme-text-secondary);
    background: var(--theme-surface-hover);
    color: var(--theme-text-strong);
    text-decoration: none;
}

.board-answer-cancel:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

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

.board-field {
    margin-bottom: 11px;
}

.board-field > label {
    display: block;
    margin: 0 0 4px;
    color: var(--theme-text, #000000);
    font-size: var(--board-small-font-size);
    font-weight: 700;
}

.board-attachment-field > .board-attachment-heading > label {
    display: block;
    margin: 0 0 4px;
    color: var(--theme-text, #000000);
    font-size: var(--board-small-font-size);
    font-weight: 700;
}

.board-field :is(
    input[type="text"],
    input[type="file"],
    select,
    textarea:not(.resources-notebook-code-input)
) {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--theme-border-soft, #d0d7de);
    border-radius: 5px;
    background: var(--theme-surface, #ffffff);
    color: var(--theme-text, #000000);
    font: inherit;
    font-size: var(--board-font-size);
    line-height: var(--board-line-height);
}

.board-field :is(input[type="text"], select) {
    height: 36px;
    padding: 6px 8px;
}

.board-field input:disabled {
    background: var(--theme-surface-muted, #f6f8fa);
    color: var(--theme-text-muted, #555555);
    opacity: 1;
}

.board-field input[type="file"] {
    padding: 6px;
    font-size: var(--board-small-font-size);
}

.board-editor-field > textarea[data-board-editor-source] {
    display: block;
    min-height: 360px;
    padding: var(--type-space-content);
    border: 0;
    border-radius: 0;
    resize: vertical;
}

.board-editor-field textarea[data-board-editor-source][hidden] {
    display: none !important;
}

.board-editor-field {
    min-width: 0;
    position: relative;
}

.board-field :is(input, select, textarea:not(.resources-notebook-code-input)):focus-visible,
.board-editor-toolbar button:focus-visible,
.board-submit:focus-visible {
    outline: 2px solid var(--theme-link, #0969da);
    outline-offset: 1px;
}

.board-field input[name="title"]:is(:focus, :focus-visible) {
    outline: 0;
    box-shadow: none;
}

.board-editor-toolbar {
    display: grid;
    grid-template-rows: repeat(2, auto);
    align-items: stretch;
    gap: var(--type-space-tight);
    min-width: 0;
    overflow: hidden;
    padding: var(--type-space-tight);
    border: 0;
    border-radius: 0;
    background: var(--theme-surface-muted, #f6f8fa);
}

.board-editor-toolbar-row {
    display: flex;
    align-items: center;
    gap: var(--type-space-tight);
    width: 100%;
    min-width: 0;
    /* `overflow-x: auto;` let mobile overlay scrollbars fade after use. */
    overflow-x: scroll;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-color: var(--theme-scrollbar-thumb) var(--theme-scrollbar-track);
    scrollbar-width: thin;
}

.board-editor-toolbar-row > :is(button, span) {
    flex: 0 0 auto;
}

.board-text-size-controls {
    display: inline-flex;
    align-items: center;
    gap: var(--type-space-tight);
    min-width: 0;
}

.board-text-align-controls,
.board-table-vertical-align-controls {
    display: inline-flex;
    align-items: center;
    gap: var(--type-space-tight);
    min-width: 0;
}

.board-editor-toolbar button,
.board-table-tools button {
    min-width: 31px;
    height: 29px;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--theme-text, #000000);
    cursor: pointer;
    font-family: var(--body-font);
    font-size: var(--board-small-font-size);
    line-height: 1;
}

.board-editor-toolbar button:hover,
.board-table-tools button:hover {
    background: var(--theme-surface-hover, #eef1f4);
}

.board-editor-toolbar button:disabled,
.board-table-tools button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.board-editor-toolbar button.is-active,
.board-table-tools button.is-active {
    background: var(--theme-text, #000000);
    color: var(--theme-bg, #ffffff);
}

.board-toolbar-icon {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.82;
    pointer-events: none;
}

.board-editor-toolbar button:hover .board-toolbar-icon,
.board-editor-toolbar button:focus-visible .board-toolbar-icon,
.board-table-tools button:hover .board-toolbar-icon,
.board-table-tools button:focus-visible .board-toolbar-icon {
    opacity: 1;
}

html[data-theme="dark"] .board-toolbar-icon,
.board-editor-toolbar button.is-active .board-toolbar-icon {
    filter: invert(1);
}

html[data-theme="dark"] .board-editor-toolbar button.is-active .board-toolbar-icon,
html[data-theme="dark"] .board-table-tools button.is-active .board-toolbar-icon {
    filter: none;
}

html[data-theme="dark"] .board-table-tools [data-board-table-action="delete-axis"] .board-toolbar-icon {
    filter: none;
}

.board-toolbar-divider {
    flex: 0 0 1px;
    width: 1px;
    height: 20px;
    margin-inline: var(--type-space-tight);
    background: var(--theme-divider-soft);
}

.board-table-control {
    display: inline-flex;
}

.board-table-tools {
    display: grid;
    grid-template-columns: repeat(6, 31px);
    grid-template-rows: 29px;
    gap: var(--type-space-tight);
    width: max-content;
    max-width: none;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    position: static;
}

.board-table-tools[hidden] {
    display: none;
}

.board-table-tools button {
    min-width: 31px;
    border-radius: 4px;
}

.board-table-tools-message {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    position: static;
    width: max-content;
    max-width: none;
    min-height: 29px;
    padding-inline: var(--type-space-compact);
    border: 0;
    background: transparent;
    color: var(--theme-error, #b42318);
    font-size: var(--board-small-font-size);
    line-height: var(--board-content-line-height);
    white-space: nowrap;
}

.board-table-tools-message[hidden] {
    display: none;
}

.board-rich-editor-shell {
    min-width: 0;
}

.board-rich-editor {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    height: clamp(360px, calc(100dvh - 220px), 560px);
    min-height: 360px;
    margin: 0;
    padding: var(--type-space-content);
    overflow-x: auto;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-color: var(--theme-scrollbar-thumb) var(--theme-scrollbar-track);
    scrollbar-width: thin;
    border: 0;
    border-radius: 0;
    background: var(--theme-surface, #ffffff);
    color: var(--theme-text);
    font-family: var(--body-font);
    font-size: var(--board-content-standard-font-size);
    line-height: var(--board-content-line-height);
    letter-spacing: normal;
    cursor: text;
}

.board-rich-editor::-webkit-scrollbar {
    display: block;
    width: 10px;
}

.board-rich-editor::-webkit-scrollbar-track {
    background: var(--theme-scrollbar-track);
}

.board-rich-editor::-webkit-scrollbar-thumb {
    min-height: 24px;
    border: 2px solid transparent;
    background: var(--theme-scrollbar-thumb);
    background-clip: padding-box;
}

/* The editable document keeps one text rhythm, including table cells. */
.board-rich-editor :is(
    h1, h2, h3, h4, h5, h6,
    p, div, ul, ol, li, blockquote, pre, code,
    table, thead, tbody, tr, th, td,
    a, strong, em, del, ins
) {
    line-height: inherit;
    letter-spacing: inherit;
}

.board-rich-editor[hidden] {
    display: none !important;
}

.board-rich-editor[aria-busy="true"] {
    opacity: 0.68;
}

.board-rich-editor:empty::before,
.board-rich-editor:has(> p[data-board-editor-tail]:only-child)::before {
    position: absolute;
    inset-block-start: var(--type-space-content);
    inset-inline: var(--type-space-content);
    display: block;
    color: var(--theme-text-muted, #555555);
    content: attr(data-placeholder);
    pointer-events: none;
}

.board-rich-editor:focus {
    outline: 0;
    box-shadow: none;
}

/* A blank line with half the normal blank-line height. */
.board-half-line-break {
    display: block;
    font-size: 50%;
    height: 1.3em;
    min-height: 1.3em;
    line-height: 1.3em;
    margin-block: 0;
}

.board-inline-image-editor {
    position: relative;
    display: inline-block;
    min-width: 80px;
    max-width: min(960px, 100%);
    resize: none;
    overflow: hidden;
    vertical-align: text-bottom;
    line-height: 0;
    cursor: grab;
    user-select: none;
    touch-action: none;
    outline: 1px solid transparent;
    outline-offset: 2px;
    background: var(--theme-surface-muted);
    transition:
        outline-color 140ms ease,
        box-shadow 140ms ease,
        background-color 140ms ease;
}

.board-inline-image-editor:hover {
    outline-color: var(--theme-border-soft);
    background: var(--theme-surface-hover);
    box-shadow: 0 2px 8px rgb(0 0 0 / 14%);
}

.board-inline-image-editor:active {
    cursor: grabbing;
    transition: none;
}

.board-inline-image-editor:is(.is-dragging, .is-resizing) {
    transition: none;
}

.board-inline-image-editor.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.board-inline-image-editor.is-resizing {
    cursor: nwse-resize;
}

.board-inline-image-editor.is-selected {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-inline-image-editor img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.board-inline-image-resize-handle {
    position: absolute;
    right: 2px;
    bottom: 2px;
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    border-right: 2px solid var(--theme-focus-ring);
    border-bottom: 2px solid var(--theme-focus-ring);
    opacity: 0;
    cursor: nwse-resize;
    touch-action: none;
    transition: opacity 120ms ease;
}

.board-inline-image-editor:is(:hover, .is-selected) .board-inline-image-resize-handle,
.board-inline-image-resize-handle:focus-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .board-inline-image-editor,
    .board-inline-image-object-actions,
    .board-inline-image-resize-handle {
        transition: none;
    }
}

.board-inline-image-drop-caret {
    display: inline-block;
    width: 2px;
    height: 1.35em;
    margin-inline: 1px;
    background: var(--theme-focus-ring);
    vertical-align: text-bottom;
    pointer-events: none;
}

.board-inline-image {
    display: inline-block;
    max-width: 100%;
    vertical-align: text-bottom;
}

.board-inline-image:not(.board-inline-image-editor) img {
    display: block;
    width: 100%;
    height: auto;
}

.board-equation-scale,
.board-rich-equation {
    --board-equation-default-max-width: 500px;
    max-width: 100%;
    height: auto;
    max-height: none;
    font-size: var(--board-equation-scale, 100%);
}

.board-rich-equation {
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    padding-block-start: calc(22px + var(--type-space-tight));
    margin-block-start: calc(-22px - var(--type-space-tight));
    overflow: visible;
    vertical-align: text-bottom;
    cursor: grab;
    touch-action: auto;
    pointer-events: none;
}

/* The negative margin keeps the action strip out of the line box. Do not let
   that transparent reserved area intercept text in the preceding line. */
.board-rich-equation > * {
    pointer-events: auto;
}

.board-equation-scale[data-board-equation-width] {
    display: inline-block;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    vertical-align: text-bottom;
}

.board-rich-equation-display {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin-inline: 0.2em;
    overflow: visible;
    vertical-align: middle;
}

.board-equation-scale[data-board-equation-display="true"] {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    vertical-align: middle;
}

.board-rich-equation:not([data-board-equation-width]),
.board-equation-scale:not([data-board-equation-width]) {
    max-width: min(var(--board-equation-default-max-width), 100%);
}

.board-rich-equation > :is(.katex, .katex-display) {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x pan-y;
}

.board-rich-equation-display > .katex-display {
    width: auto;
    min-width: 0;
    height: auto;
    max-height: none;
    margin-block: 0;
}

.board-rich-equation-display > .katex-display > .katex,
.board-equation-scale[data-board-equation-display="true"] > .katex-display {
    width: max-content;
    min-width: 100%;
    height: auto;
    max-height: none;
    margin-block: 0;
    overflow: visible;
}

/* Auto-rendered legacy inline math is the KaTeX root itself, so retain KaTeX's baseline scale. */
.board-rich-equation.katex {
    font-size: 1.21em;
}

.board-rich-equation:is(:hover, :focus-visible, .is-selected) {
    outline: 1px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-rich-equation.is-dragging {
    cursor: grabbing;
    opacity: 0.6;
}

.board-rich-equation.is-resizing {
    cursor: ew-resize;
    user-select: none;
}

.board-rich-equation.is-selected {
    z-index: 3;
}

/* Keep KaTeX glyphs on the theme foreground when the atomic equation range is selected. */
.board-rich-equation.is-selected::selection,
.board-rich-equation.is-selected *::selection {
    color: currentColor;
    background: transparent;
}

.board-equation-object-actions {
    position: absolute;
    z-index: 2;
    top: 2px;
    inset-inline-end: 10px;
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--theme-border-soft);
    border-radius: 4px;
    background: var(--theme-surface);
    opacity: 0;
    pointer-events: none;
    place-items: center;
    transition:
        opacity 120ms ease,
        border-color 120ms ease,
        background-color 120ms ease;
}

.board-rich-equation.is-selected .board-equation-object-actions,
.board-equation-object-actions:focus-within {
    opacity: 1;
    pointer-events: auto;
}

.board-equation-object-action {
    display: grid;
    width: 18px;
    height: 18px;
    min-width: 18px;
    padding: 2px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: var(--theme-text);
    cursor: pointer;
    place-items: center;
}

.board-equation-resize-handle {
    position: absolute;
    z-index: 3;
    inset-block: 2px;
    inset-inline-end: 0;
    display: block;
    box-sizing: border-box;
    width: 9px;
    height: auto;
    min-width: 9px;
    border: 0;
    border-radius: 3px 0 0 3px;
    background: transparent;
    color: var(--theme-text-muted);
    cursor: ew-resize;
    opacity: 0;
    pointer-events: none;
    touch-action: none;
}

.board-equation-resize-handle::before {
    position: absolute;
    top: 25%;
    right: 2px;
    bottom: 25%;
    width: 2px;
    background: currentColor;
    content: "";
}

.board-equation-resize-handle::after {
    content: none;
}

.board-rich-equation.is-selected > .board-equation-resize-handle,
.board-equation-resize-handle:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

.board-equation-resize-handle:is(:hover, :focus-visible) {
    background: var(--theme-surface-hover);
    color: var(--theme-focus-ring);
    outline: none;
}

.board-equation-object-action[aria-pressed="true"] {
    border-color: var(--theme-focus-ring);
    background: var(--theme-surface-hover);
}

.board-equation-object-action.board-equation-remove {
    color: var(--theme-error-text);
}

.board-equation-object-action:is(:hover, :focus-visible) {
    border-color: var(--theme-secondary-button-border-hover);
    background: var(--theme-surface-hover);
}

.board-equation-object-action.board-equation-remove:is(:hover, :focus-visible) {
    border-color: var(--theme-error-text);
    background: var(--theme-error-surface);
}

.board-equation-object-action:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.board-equation-object-action-icon {
    display: block;
    width: 12px;
    height: 12px;
    pointer-events: none;
}

html[data-theme="dark"] .board-equation-object-action-icon {
    filter: invert(1);
}

.board-preview-empty {
    color: var(--theme-text-muted, #555555);
}

.board-editor-status {
    margin: var(--board-space-1) 0 0;
    color: var(--theme-error-text, #cf222e);
    font-size: var(--board-small-font-size);
}

.board-editor-meta {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.board-editor-meta p,
.board-field-help,
.board-private-note {
    margin: 0;
    color: var(--theme-text-muted, #555555);
    font-size: var(--board-small-font-size);
    line-height: var(--board-line-height);
}

.board-form-errors,
.board-field-error {
    margin: 4px 0 0;
    color: var(--theme-error-text, #cf222e);
    font-size: var(--board-small-font-size);
}

.board-form-errors ul {
    margin: 0;
    color: inherit;
    font-size: inherit;
}

.board-form-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--type-space-content);
    margin-bottom: 0;
}

.board-form-options > .board-field {
    margin-bottom: 0;
}

.board-private-field {
    min-width: 0;
}

.board-attachment-field {
    min-width: 0;
}

.board-attachment-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25em;
    min-width: 0;
}

.board-attachment-heading .board-field-help {
    display: inline;
    margin: 0;
}

.board-attachment-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--type-space-tight);
    margin-top: 4px;
    min-width: 0;
}

.board-attachment-input {
    position: absolute;
    width: 1px !important;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.board-attachment-choose {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 26px;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    background: var(--theme-surface-muted);
    color: var(--theme-text);
    cursor: pointer;
    font: inherit;
    font-size: var(--board-small-font-size);
    line-height: var(--board-line-height);
}

.board-attachment-choose:is(:hover, :focus-visible) {
    border-color: var(--theme-text-subtle);
    background: var(--theme-surface-hover);
}

.board-attachment-choose:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-attachment-selection {
    display: flex;
    flex: 1 1 180px;
    flex-wrap: wrap;
    gap: var(--type-space-tight);
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.board-download-link-editor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--type-space-tight);
    margin-top: var(--type-space-tight);
    min-width: 0;
}

.board-download-link-editor[hidden] {
    display: none;
}

.board-download-link-editor input {
    box-sizing: border-box;
    min-width: 0;
    min-height: 26px;
    border: 1px solid var(--theme-secondary-button-border);
    border-radius: 5px;
    background: var(--theme-bg);
    color: var(--theme-text);
    font: inherit;
    font-size: var(--board-small-font-size);
    line-height: var(--board-line-height);
}

.board-download-link-editor input[data-board-download-link-label] {
    flex: 1 1 120px;
}

.board-download-link-editor input[data-board-download-link-url] {
    flex: 2 1 220px;
}

.resources-post-github-attachment-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
}

.resources-post-github-attachment-editor input[data-board-github-attachment-label],
.resources-post-github-attachment-editor input[data-board-github-attachment-url] {
    width: 100%;
    min-width: 0;
}

.resources-post-github-attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--type-space-tight);
}

.board-download-link-selection {
    flex-basis: 100%;
    margin-top: var(--type-space-tight);
}

.board-existing-attachment-editor {
    flex-basis: 100%;
    min-width: 0;
    margin-top: var(--type-space-tight);
}

.board-existing-attachment-editor > div:not(.board-attachment-heading) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--type-space-tight);
    margin-top: var(--type-space-tight);
}

.board-existing-attachment-editor > div:not(.board-attachment-heading) > div {
    min-width: 0;
}

.board-existing-attachment-editor label {
    display: inline-flex;
    align-items: center;
    max-width: min(100%, 260px);
    min-width: 0;
    padding: 2px 6px;
    border: 1px solid var(--theme-border-soft);
    border-radius: 4px;
    background: var(--theme-surface-muted);
    color: var(--theme-text);
    font-size: var(--board-small-font-size);
    line-height: var(--board-line-height);
    cursor: pointer;
}

.board-existing-attachment-editor input {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0 var(--type-space-tight) 0 0;
    accent-color: var(--theme-link);
}

.board-form-fallback-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--type-space-content);
}

.board-form-fallback-actions[hidden] {
    display: none;
}

.board-attachment-chip {
    display: inline-flex;
    align-items: center;
    max-width: min(100%, 220px);
    min-width: 0;
    padding: 2px 4px 2px 6px;
    border: 1px solid var(--theme-border-soft);
    border-radius: 4px;
    background: var(--theme-surface-muted);
    color: var(--theme-text);
    font-size: var(--board-small-font-size);
    line-height: var(--board-line-height);
}

.board-attachment-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-attachment-remove {
    display: inline-grid;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-inline-start: var(--type-space-tight);
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: var(--theme-text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    line-height: 1;
    place-items: center;
}

.board-attachment-remove:is(:hover, :focus-visible) {
    background: var(--theme-surface-hover);
    color: var(--theme-text);
}

.board-attachment-remove:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 1px;
}

.board-private-control {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--theme-text, #000000);
    cursor: pointer;
    font-size: var(--board-small-font-size);
}

.board-private-control input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--theme-link, #0969da);
}

.board-submit,
.board-login-prompt a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-primary-action);
    border-radius: 4px;
    background: var(--theme-primary-action);
    color: var(--theme-primary-action-text);
    cursor: pointer;
    font-family: var(--body-font);
    font-size: var(--board-small-font-size);
    font-weight: 600;
    line-height: var(--type-leading-ui);
    text-decoration: none;
    white-space: nowrap;
}

.board-submit:hover,
.board-login-prompt a:hover {
    border-color: var(--theme-primary-action-hover);
    background: var(--theme-primary-action-hover);
    color: var(--theme-primary-action-text);
    opacity: 1;
    text-decoration: none;
}

.board-private-note {
    margin-top: 6px;
}

.board-login-prompt,
.board-empty-state {
    margin: var(--type-space-content) 0;
    padding: var(--type-space-page);
    border: 1px dashed var(--theme-border-soft, #d0d7de);
    border-radius: 8px;
    text-align: center;
}

.board-login-prompt p,
.board-empty-state p {
    margin: 0 0 10px;
    color: var(--theme-text-muted, #555555);
    font-size: var(--board-font-size);
}

.board-empty-state a {
    color: var(--theme-link, #0969da);
    font-size: var(--board-small-font-size);
}

.board-recent-posts {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.board-recent-post-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    color: var(--theme-text);
    font-size: var(--board-font-size);
    line-height: var(--type-leading-ui);
    table-layout: fixed;
}

.board-recent-post-table th,
.board-recent-post-table td {
    padding: var(--type-space-tight) var(--type-space-compact);
    text-align: start;
    vertical-align: middle;
}

.board-recent-post-table thead {
    border-block-end: 1px solid var(--theme-divider-standard);
}

.board-recent-post-table th {
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
    font-weight: 400;
    white-space: nowrap;
}

.board-recent-post-table tbody tr + tr {
    border-block-start: 1px dotted var(--theme-divider-dotted);
}

.board-recent-post-table th:nth-child(1) { width: 15%; }
.board-recent-post-table th:nth-child(2) { width: 7%; }
.board-recent-post-table th:nth-child(3) { width: auto; }
.board-recent-post-table th:nth-child(4) { width: 14%; }
.board-recent-post-table th:nth-child(5) { width: 4ch; }

.board-recent-post-table :is(td:nth-child(1), td:nth-child(2)) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-recent-post-table :is(th, td):nth-child(2) {
    padding-inline: 4px;
}

.board-recent-post-table :is(th, td):nth-child(4) {
    padding-inline-end: 1ch;
    text-align: end;
}

.board-recent-post-table :is(th, td):nth-child(5) {
    padding-inline: 0;
    text-align: end;
}

.board-post-view-count {
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.board-post-list-date {
    flex: 0 0 5ch;
    width: 5ch;
    font-variant-numeric: tabular-nums;
    text-align: end;
    white-space: nowrap;
}

.board-recent-post-title-cell {
    min-width: 0;
}

.board-recent-post-channel,
.board-recent-post-channel:visited {
    color: var(--theme-text);
    font-size: var(--board-small-font-size);
    text-decoration: none;
}

.board-recent-post-channel:hover,
.board-recent-post-channel:focus-visible {
    text-decoration: underline;
}

.board-recent-post-meta {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    justify-content: flex-end;
}

.board-recent-post-meta > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-recent-post-meta time {
    flex: 0 0 auto;
}

.board-recent-post-title-cell .board-locked-title-text {
    display: inline-block;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.board-recent-post-unavailable {
    color: var(--theme-text-muted);
    text-align: center !important;
}

@media (max-width: 700px) {
    .board-recent-post-table th:nth-child(1) { width: 64px; }
    .board-recent-post-table th:nth-child(2) { width: 48px; }
    .board-recent-post-table th:nth-child(3) { width: auto; }
    .board-recent-post-table th:nth-child(4) { width: 108px; }
    .board-recent-post-table th:nth-child(5) { width: 4ch; }

    .board-recent-post-meta {
        align-items: flex-end;
        flex-direction: column;
        gap: 0;
        overflow: visible;
        white-space: normal;
    }

    .board-recent-post-meta > span {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 560px) {
    .board-recent-post-table :is(th, td):nth-child(1),
    .board-recent-post-table :is(th, td):nth-child(2),
    .board-recent-post-table :is(th, td):nth-child(5) {
        display: none;
    }

    .board-recent-post-table th:nth-child(3) { width: auto; }
    .board-recent-post-table th:nth-child(4) { width: 56px; }

    .board-recent-post-meta {
        align-items: baseline;
        flex-direction: row;
        justify-content: flex-end;
        overflow: hidden;
        white-space: nowrap;
    }

    .board-recent-post-meta > .board-post-author,
    .board-post-header > .board-post-meta > .board-post-author {
        display: none;
    }

    .board-post-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: var(--type-space-tight);
    }

    .board-post-header > .board-post-meta {
        grid-column: 2;
        max-width: none;
        justify-self: end;
    }

    .board-post-header > .board-post-meta .board-post-list-view-count {
        display: none;
    }
}

.board-post-list {
    margin-top: 0;
    --board-post-tree-step: 16px;
}

/* Every editor keeps one real, clickable line after its final object. */
.board-rich-editor > p[data-board-editor-tail] {
    display: block;
    min-height: calc(var(--board-content-standard-font-size) * var(--board-content-line-height));
    margin: 0;
    cursor: text;
}

.board-post {
    padding: var(--type-space-tight) var(--type-space-compact);
    position: relative;
    min-width: 0;
    content-visibility: auto;
    contain-intrinsic-size: auto 28px;
}

.board-post + .board-post {
    border-top: 1px dotted var(--theme-divider-dotted);
}

.board-post-children {
    position: relative;
    min-width: 0;
    margin-block-start: var(--type-space-tight);
    margin-inline: calc(-1 * var(--type-space-compact));
    border-block-start: 1px dotted var(--theme-divider-dotted);
}

.board-post-id {
    flex: 0 0 auto;
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
}

.board-post.has-post-answers {
    padding-block-end: 0;
}

.board-post-children > .board-post::before {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: calc(
        var(--type-space-compact)
        + (var(--board-post-tree-depth) - 1) * var(--board-post-tree-step)
    );
    width: var(--board-post-tree-step);
    height: calc(var(--type-space-tight) + 0.625em);
    border-inline-start: 1px solid var(--theme-divider-standard);
    border-block-end: 1px solid var(--theme-divider-standard);
    content: "";
    pointer-events: none;
}

.board-post-children > .board-post:not(:last-child)::after {
    position: absolute;
    inset-block-start: calc(var(--type-space-tight) + 0.625em);
    inset-block-end: calc(-1 * var(--type-space-tight));
    inset-inline-start: calc(
        var(--type-space-compact)
        + (var(--board-post-tree-depth) - 1) * var(--board-post-tree-step)
    );
    border-inline-start: 1px solid var(--theme-divider-standard);
    content: "";
    pointer-events: none;
}

.board-post-children > .board-post + .board-post {
    margin-block-start: 0;
    border-block-start: 1px dotted var(--theme-divider-dotted);
}

.board-submit:disabled {
    cursor: progress;
    opacity: 0.65;
}

.board-submit.is-pending,
.board-composer-summary.is-pending {
    cursor: progress;
    pointer-events: none;
}

.board-submit.is-pending > *,
.board-composer-summary.is-pending > * {
    visibility: hidden;
}

.board-submit.is-pending::after,
.board-composer-summary.is-pending::after {
    position: absolute;
    top: 50%;
    left: 50%;
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    color: var(--theme-primary-action-text);
    content: "";
    transform: translate(-50%, -50%);
    animation: board-submit-spinner 0.7s linear infinite;
}

@keyframes board-submit-spinner {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .board-submit.is-pending::after,
    .board-composer-summary.is-pending::after {
        animation: none;
    }

    .board-layout,
    .board-layout::before,
    .board-sidebar-toggle,
    .board-reply-composer-icon {
        transition: none;
    }
}

.board-post:target {
    background: color-mix(in srgb, var(--theme-link, #0969da) 7%, transparent);
}

.board-post-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.board-post-identity {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.board-post-identity h2 {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.35em;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--theme-text, #000000);
    font-size: var(--board-font-size);
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.board-post[data-post-depth]:not([data-post-depth="0"]) :is(
    .board-post-identity h2,
    .board-locked-title
) {
    margin-inline-start: calc(
        var(--board-post-tree-depth) * var(--board-post-tree-step)
    );
}

.board-post-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: inherit;
    text-decoration: none;
}

.board-post-title,
.board-post-title:visited,
.board-post-title:hover,
.board-post-title:focus-visible {
    color: var(--theme-text);
}

.board-post-title:hover,
.board-post-title:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.board-locked-title {
    display: flex;
    align-items: center;
    gap: 0.35em;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--theme-text, #000000);
    font-size: var(--board-font-size);
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.board-locked-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-post-meta {
    display: flex;
    position: relative;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 7px;
    margin: 0;
    color: var(--theme-text-muted, #555555);
    font-size: var(--board-small-font-size);
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.board-post-meta :is(span, time) {
    font-weight: 400;
}

/* Answer posts share the exact metadata scale and right-hand column of ordinary list posts. */
.board-post-header > .board-post-meta,
.board-post-header > .board-post-meta :is(span, time, a, button) {
    font-size: var(--board-small-font-size);
    font-weight: 400;
}

.board-post-header > .board-post-meta {
    justify-self: end;
}

.board-post[data-post-depth] .board-post-identity > p,
.board-post[data-post-depth] .board-post-identity > p > :is(span, time) {
    color: var(--theme-text-muted) !important;
    font-size: var(--board-small-font-size) !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
}

.board-detail {
    min-width: 0;
    margin-top: 12px;
    padding: var(--type-space-content);
    border: 1px solid var(--theme-border-soft);
    border-radius: 8px;
    background: transparent;
}

.board-detail-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: var(--type-space-content) 0;
}

.board-detail-toolbar + .board-detail {
    margin-top: 0;
}

.board-section .board-back-link,
.board-section .board-back-link:visited,
.board-section .board-back-link:active {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: var(--type-space-tight);
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    background: var(--theme-surface-muted);
    color: var(--theme-text);
    cursor: pointer;
    font: inherit;
    font-size: var(--code-display-font-size);
    font-weight: 400;
    line-height: var(--main-font-spacing);
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    text-decoration: none;
}

.board-back-icon,
.board-attachment-icon {
    display: block;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.board-section .board-back-link:hover,
.board-section .board-back-link:focus-visible {
    border-color: var(--theme-border);
    background: var(--theme-surface-hover);
    color: var(--theme-text);
    text-decoration: none;
}

.board-section .board-back-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 3px;
}

.board-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--type-space-page);
    padding-bottom: var(--type-space-content);
    border-bottom: 1px solid var(--theme-divider-standard);
}

.board-detail-header h1 {
    display: flex;
    align-items: center;
    gap: 0.35em;
    margin: 0;
    color: var(--theme-text, #000000);
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.board-detail-header .board-post-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    margin: var(--type-space-content) 0 0;
    color: var(--theme-text-muted, #555555);
    font-size: var(--board-small-font-size);
    font-weight: 400;
    line-height: 1.25;
}

.board-detail-header .board-post-meta :is(span, time) {
    font-weight: 400;
}

.board-detail-reply-actions :is(a, button) {
    font-size: var(--board-small-font-size);
    font-weight: 400;
}

.board-post-action-divider {
    color: var(--theme-text-muted, #555555);
    font-size: var(--board-small-font-size);
    line-height: 1.25;
}

.board-detail .board-markdown,
.board-detail .board-attachment-list {
    margin-left: 0;
}

.board-answer-composer {
    min-width: 0;
    margin-top: var(--type-space-content);
    padding: var(--type-space-content);
    border: 1px solid var(--theme-border-soft);
    border-radius: 8px;
    background: var(--theme-surface);
}

.board-replies {
    --board-reply-branch-point: calc(
        var(--type-control-padding-block)
        + var(--type-notebook-control-height)
        + var(--type-space-tight)
        + 0.65em
    );
    min-width: 0;
    margin-top: var(--type-space-content);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.board-reply-list {
    display: grid;
    gap: var(--type-space-compact);
    margin-top: var(--type-space-content);
}

.board-reply-list.has-replies {
    position: relative;
    margin-inline-start: var(--type-space-content);
    padding-inline-start: var(--type-space-content);
}

.board-reply-list:not(.has-replies) {
    padding-bottom: var(--type-space-content);
}

.board-reply {
    position: relative;
    min-width: 0;
    padding-block: var(--type-control-padding-block);
    border-block: 0;
    background: transparent;
}

.board-reply-row {
    display: block;
    min-width: 0;
}

.board-reply-meta {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    width: 100%;
    min-height: var(--type-notebook-control-height);
    min-width: 0;
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
    line-height: 1.25;
    white-space: nowrap;
}

.board-reply-identity-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: var(--type-space-compact);
    min-width: 0;
}

.board-reply-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: var(--type-space-tight);
}

.board-reply-identity-actions strong {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 18rem;
    overflow: hidden;
    color: var(--theme-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-reply-identity-actions time {
    flex: 0 0 auto;
}

.board-reply-actions form {
    margin: 0;
}

.board-reply-edit,
.board-reply-delete,
.board-reply-reply {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: var(--board-small-font-size);
    line-height: inherit;
    text-decoration: none;
}

.board-reply-edit,
.board-reply-edit:visited,
.board-reply-reply {
    color: var(--theme-text-muted);
}

.board-reply-delete {
    color: var(--theme-error-text);
}

.board-reply-edit:is(:hover, :focus-visible),
.board-reply-delete:is(:hover, :focus-visible),
.board-reply-reply:is(:hover, :focus-visible) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.board-reply-content.board-markdown {
    margin: var(--type-space-tight) 0 0;
    padding-block-end: 0;
    border-block-end: 0;
}

.board-reply-list.has-replies > .board-reply::before {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: calc(-1 * var(--type-space-content) - 1px);
    width: var(--type-space-content);
    height: var(--board-reply-branch-point);
    border-inline-start: 1px solid var(--theme-divider-standard);
    border-block-end: 1px solid var(--theme-divider-standard);
    content: "";
    pointer-events: none;
}

.board-reply-list.has-replies > .board-reply:not(:last-child)::after {
    position: absolute;
    inset-block-start: var(--board-reply-branch-point);
    inset-block-end: calc(-1 * var(--type-space-compact));
    inset-inline-start: calc(-1 * var(--type-space-content) - 1px);
    border-inline-start: 1px solid var(--theme-divider-standard);
    content: "";
    pointer-events: none;
}

.board-reply-children {
    position: relative;
    min-width: 0;
    margin-block-start: var(--type-space-tight);
    margin-inline-start: var(--type-space-content);
    padding-inline-start: var(--type-space-content);
}

.board-reply-children > .board-reply::before {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: calc(-1 * var(--type-space-content) - 1px);
    width: var(--type-space-content);
    height: var(--board-reply-branch-point);
    border-inline-start: 1px solid var(--theme-divider-standard);
    border-block-end: 1px solid var(--theme-divider-standard);
    content: "";
    pointer-events: none;
}

.board-reply-children > .board-reply:not(:last-child)::after {
    position: absolute;
    inset-block-start: var(--board-reply-branch-point);
    inset-block-end: calc(-1 * var(--type-space-tight));
    inset-inline-start: calc(-1 * var(--type-space-content) - 1px);
    border-inline-start: 1px solid var(--theme-divider-standard);
    content: "";
    pointer-events: none;
}

.board-reply-children > .board-reply + .board-reply {
    margin-block-start: var(--type-space-tight);
}

.board-child-reply-composer {
    position: relative;
    margin-block-start: var(--type-space-tight);
}

.board-child-reply-form {
    margin-top: 0;
}

.board-child-reply-form textarea[data-board-reply-editor] {
    min-height: 80px;
}

.board-reply-edit-form {
    min-width: 0;
    margin: 0;
}

.board-reply-edit-form textarea[data-board-reply-edit-editor] {
    display: block;
    width: 100%;
    min-height: 120px;
    padding: var(--type-space-content);
    border: 0;
    border-radius: 0;
    background: var(--theme-surface);
    resize: vertical;
}

.board-reply-edit-form textarea[data-board-reply-edit-editor]:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-reply-edit-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--type-space-tight) var(--type-space-content);
    margin-top: var(--type-space-tight);
}

.board-reply-edit-meta p {
    margin: 0;
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
    line-height: var(--board-line-height);
}

.board-reply-edit-actions {
    display: flex;
    align-items: center;
    gap: var(--type-space-compact);
    margin-left: auto;
}

.board-reply-edit-actions a,
.board-reply-edit-actions a:visited {
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
    text-decoration: none;
}

.board-reply-edit-actions a:is(:hover, :focus-visible) {
    color: var(--theme-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.board-reply-edit-submit {
    align-self: auto;
}

.board-reply-empty {
    margin: 0;
    color: var(--theme-text-muted);
    font-size: var(--board-font-size);
}

.board-reply-composer {
    display: none;
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.board-reply-composer[open] {
    display: block;
}

.board-reply-composer-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--type-space-tight);
    min-height: 0;
    margin: 0;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-text-subtle);
    border-radius: 4px;
    background: var(--theme-secondary-button-bg);
    color: var(--theme-text-strong);
    cursor: pointer;
    font-size: var(--board-small-font-size);
    font-weight: 600;
    line-height: var(--type-leading-ui);
    list-style: none;
}

.board-reply-composer-summary::-webkit-details-marker {
    display: none;
}

.board-reply-composer-summary:is(:hover, :focus-visible),
.board-reply-composer[open] .board-reply-composer-summary {
    border-color: var(--theme-text-secondary);
    background: var(--theme-surface-hover);
}

.board-reply-composer-summary:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-reply-composer-icon {
    display: block;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    transition: transform 120ms ease;
}

.board-reply-composer[open] .board-reply-composer-icon {
    transform: rotate(180deg);
}

.board-reply-form {
    width: 100%;
    margin-top: var(--type-space-content);
}

.board-reply-field {
    margin-bottom: 0;
}

.board-reply-editor {
    min-width: 0;
}

.board-reply-editor-actions {
    display: flex;
    width: fit-content;
    gap: var(--type-space-tight);
    justify-content: flex-end;
    margin-block-start: var(--type-space-tight);
    margin-inline-start: auto;
}

.board-reply-compose-actions :is(.board-reply-cancel, .board-reply-submit) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    min-width: 88px;
    height: 26px;
    min-height: 0;
    margin: 0;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border-radius: 4px;
    font-size: var(--board-small-font-size);
    font-weight: 600;
    line-height: var(--type-leading-ui);
    text-decoration: none;
    white-space: nowrap;
}

.board-reply-cancel,
.board-reply-cancel:visited {
    border: 1px solid var(--theme-text-subtle);
    background: var(--theme-secondary-button-bg);
    color: var(--theme-text-strong);
}

.board-reply-cancel:is(:hover, :focus-visible) {
    border-color: var(--theme-text-secondary);
    background: var(--theme-surface-hover);
    color: var(--theme-text-strong);
    text-decoration: none;
}

.board-reply-cancel:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-reply-editor textarea[data-board-reply-editor] {
    display: block;
    min-height: 120px;
    padding: var(--type-space-content);
    border: 0;
    border-radius: 0;
    background: var(--theme-surface);
    resize: vertical;
}

.board-reply-editor textarea[data-board-reply-editor]:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-reply-editor-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--type-space-content);
    min-width: 0;
    margin-top: var(--type-space-tight);
}

.board-reply-editor-meta p {
    margin: 0;
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
    line-height: var(--board-line-height);
}

.board-reply-editor-meta p:last-child {
    flex: 0 0 auto;
    white-space: nowrap;
}

.board-reply-submit {
    min-height: 0;
    border-color: var(--theme-primary-action);
    border-radius: 4px;
    background: var(--theme-primary-action);
    color: var(--theme-primary-action-text);
    font-weight: 600;
    line-height: var(--type-leading-ui);
}

.board-reply-submit:hover {
    border-color: var(--theme-primary-action-hover);
    background: var(--theme-primary-action-hover);
    color: var(--theme-primary-action-text);
    opacity: 1;
}

.board-reply-submit:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-private-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    margin-left: 0;
    color: var(--theme-text-muted, #555555);
    font-size: var(--board-small-font-size);
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.board-private-icon {
    display: block;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    opacity: 1;
}

html[data-theme="dark"] .board-private-icon {
    filter: invert(1);
    opacity: 1;
}

.board-post-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--type-space-compact);
}

.board-post-actions form {
    margin: 0;
}

.board-post-list-actions {
    gap: var(--type-space-tight);
}

.board-post-actions a,
.board-post-actions button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: inherit;
    font-weight: 400;
    text-decoration: none;
}

.board-post-actions a:not(.board-post-answer) {
    color: var(--theme-link);
    font-size: var(--board-small-font-size);
    font-weight: 400;
}

/* Detail reply entry points are denser than reply-tree actions. */
.board-detail-reply-actions :is(.board-post-reply, .board-post-answer),
.board-reply-actions .board-reply-reply {
    appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding-inline: var(--type-control-padding-inline);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--body-font);
    font-size: var(--board-small-font-size);
    font-weight: 600;
    line-height: var(--type-leading-ui);
    text-decoration: none;
    white-space: nowrap;
}

.board-detail-reply-actions :is(.board-post-reply, .board-post-answer) {
    height: 26px;
    padding-block: var(--type-control-padding-block);
}

.board-reply-actions .board-reply-reply {
    height: 26px;
    padding-block: var(--type-control-padding-block);
}

.board-detail-reply-actions .board-post-reply,
.board-reply-actions .board-reply-reply {
    border: 1px solid var(--theme-primary-action);
    background: var(--theme-primary-action);
    color: var(--theme-primary-action-text);
}

.board-detail-reply-actions .board-post-answer {
    border: 0;
    background: var(--theme-positive-action);
    color: var(--theme-positive-action-text);
}

.board-detail-reply-actions .board-post-reply:is(:hover, :focus-visible),
.board-reply-actions .board-reply-reply:is(:hover, :focus-visible) {
    border-color: var(--theme-primary-action-hover);
    background: var(--theme-primary-action-hover);
    color: var(--theme-primary-action-text);
    text-decoration: none;
}

.board-detail-reply-actions .board-post-answer:is(:hover, :focus-visible) {
    border: 0;
    background: var(--theme-positive-action-hover);
    color: var(--theme-positive-action-text);
    text-decoration: none;
}

.board-detail-reply-actions :is(.board-post-reply, .board-post-answer):focus-visible,
.board-reply-actions .board-reply-reply:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-post-actions button.board-post-delete {
    appearance: none !important;
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--theme-error-text) !important;
    font: inherit !important;
    font-size: var(--board-small-font-size) !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
}

.board-post-actions button.board-post-delete:is(:hover, :focus-visible) {
    color: var(--theme-error-text) !important;
}

.board-post-actions :is(a, button):hover,
.board-post-actions :is(a, button):focus-visible {
    color: var(--theme-text, #000000);
    text-decoration: underline;
}

.board-detail-reply-actions :is(a, button):is(:hover, :focus-visible) {
    text-decoration: underline;
}

.board-markdown {
    min-width: 0;
    margin: var(--type-space-content) 0 0 47px;
    color: var(--theme-text, #000000);
    font-family: var(--body-font);
    font-size: var(--board-content-standard-font-size);
    line-height: var(--board-content-line-height);
    overflow-wrap: anywhere;
}

.board-markdown * {
    line-height: var(--board-content-line-height);
}

.board-markdown > :first-child {
    margin-top: 0;
}

.board-markdown > :last-child {
    margin-bottom: 0;
}

.board-markdown :is(h1, h2, h3, h4, h5, h6) {
    margin-top: 0.9em;
    margin-bottom: 0.45em;
    color: inherit;
    font-weight: 700;
    line-height: inherit;
}

.board-markdown h1 {
    font-size: var(--board-content-large-font-size);
}

.board-markdown h2 {
    font-size: var(--board-content-standard-font-size);
}

.board-markdown h3 {
    font-size: var(--board-content-small-font-size);
}

.board-markdown :is(h4, h5, h6) {
    font-size: var(--board-content-small-font-size);
}

.board-markdown :is(p, ul, ol, blockquote, pre, table, hr) {
    margin-top: 0;
    margin-bottom: 0.7em;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.board-markdown :is(ul, ol) {
    padding-left: 1.5em;
}

.board-markdown ul:not(.contains-task-list) {
    list-style-type: disc;
    list-style-position: outside;
}

/* Nested unordered lists alternate filled and hollow circle markers so list
   depth remains visible without introducing a second visual language. */
.board-markdown ul ul:not(.contains-task-list),
.board-markdown ul ul ul ul:not(.contains-task-list),
.board-markdown ul ul ul ul ul ul:not(.contains-task-list),
.board-markdown ul ul ul ul ul ul ul ul:not(.contains-task-list) {
    list-style-type: circle;
}

.board-markdown ul ul ul:not(.contains-task-list),
.board-markdown ul ul ul ul ul:not(.contains-task-list),
.board-markdown ul ul ul ul ul ul ul:not(.contains-task-list) {
    list-style-type: disc;
}

.board-markdown ol {
    list-style-type: decimal;
    list-style-position: outside;
}

.board-markdown ul > li[data-board-list-indent-depth="1"],
.board-markdown ul > li[data-board-list-indent-depth="3"],
.board-markdown ul > li[data-board-list-indent-depth="5"],
.board-markdown ul > li[data-board-list-indent-depth="7"] {
    list-style-type: circle;
}

.board-markdown ul > li[data-board-list-indent-depth="2"],
.board-markdown ul > li[data-board-list-indent-depth="4"],
.board-markdown ul > li[data-board-list-indent-depth="6"],
.board-markdown ul > li[data-board-list-indent-depth="8"] {
    list-style-type: disc;
}

/* Independent list depth uses a visual translate so markers and text move as
   one object. Reduce the layout width by the same amount; otherwise a long
   translated item still owns its pre-translate 100% width and crosses the
   Board content's right boundary. */
.board-markdown :is(ul, ol) > li[data-board-list-indent-depth] {
    box-sizing: border-box;
    inline-size: max(0px, calc(100% - var(--board-list-indent-offset, 0px)));
    max-inline-size: max(0px, calc(100% - var(--board-list-indent-offset, 0px)));
    overflow-wrap: anywhere;
}

.board-markdown :is(ul, ol) > li[data-board-list-indent-depth="1"] {
    --board-list-indent-offset: 1.5em;
}

.board-markdown :is(ul, ol) > li[data-board-list-indent-depth="2"] {
    --board-list-indent-offset: 3em;
}

.board-markdown :is(ul, ol) > li[data-board-list-indent-depth="3"] {
    --board-list-indent-offset: 4.5em;
}

.board-markdown :is(ul, ol) > li[data-board-list-indent-depth="4"] {
    --board-list-indent-offset: 6em;
}

.board-markdown :is(ul, ol) > li[data-board-list-indent-depth="5"] {
    --board-list-indent-offset: 7.5em;
}

.board-markdown :is(ul, ol) > li[data-board-list-indent-depth="6"] {
    --board-list-indent-offset: 9em;
}

.board-markdown :is(ul, ol) > li[data-board-list-indent-depth="7"] {
    --board-list-indent-offset: 10.5em;
}

.board-markdown :is(ul, ol) > li[data-board-list-indent-depth="8"] {
    --board-list-indent-offset: 12em;
}

.board-markdown :is(ul, ol) > li {
    display: list-item;
}

.board-markdown :is(li, strong, em, del, a) {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.board-markdown a {
    color: var(--theme-link, #0969da);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.board-markdown a:visited {
    color: var(--theme-link-visited);
}

.board-markdown a:is(:hover, :focus-visible) {
    color: var(--theme-link-hover);
}

.board-markdown del {
    color: var(--theme-error-text);
    text-decoration-color: currentColor;
}

.board-markdown ins {
    color: var(--theme-success);
    text-decoration-color: currentColor;
}

.board-markdown .board-text-underline,
.board-rich-editor .board-text-underline {
    text-decoration-line: underline;
    text-decoration-thickness: from-font;
    text-underline-offset: 0.14em;
}

.board-markdown blockquote {
    padding-left: 10px;
    border-left: 3px solid var(--theme-border-soft, #d0d7de);
    color: var(--theme-text-muted, #555555);
}

.board-markdown code {
    display: inline;
    padding: 0.12em 0.32em;
    border-radius: 4px;
    background: var(--theme-inline-code-bg);
    color: var(--theme-inline-code-text);
    font-family: var(--code-font);
    font-size: var(--code-display-font-size);
}

/* Inline code needs its own visible surface on the dark theme; prose and code
   must never rely on the same nearly-black background token. */
html[data-theme="dark"] .board-markdown :not(pre, .board-inline-code-block) > code {
    background: #d5d9df;
    color: #17243a;
}

.board-markdown pre {
    max-width: 100%;
    padding: var(--type-space-content);
    overflow: auto;
    border: 1px solid var(--theme-code-border);
    border-radius: 6px;
    background: var(--theme-code-bg, #0d1117);
    color: var(--theme-code-text);
    white-space: pre;
}

.board-markdown pre code {
    display: block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-family: var(--code-font);
    font-size: var(--code-display-font-size);
    line-height: inherit;
}

.board-inline-code-block {
    position: relative;
    display: inline-grid;
    grid-template-rows: auto auto auto;
    box-sizing: border-box;
    min-width: min(240px, 100%);
    max-width: min(960px, 100%);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--theme-code-border);
    border-radius: 6px;
    background: var(--theme-code-bg, #0d1117);
    color: var(--theme-code-text);
    vertical-align: text-bottom;
    white-space: normal;
}

.board-inline-code-block > code,
.board-markdown .board-inline-code-block > code {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: calc(1lh + var(--type-space-compact) + var(--type-space-compact));
    padding: var(--type-space-compact) var(--type-space-content);
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font-family: var(--code-font);
    font-size: var(--code-display-font-size);
    line-height: inherit;
    white-space: pre;
}

.board-inline-code-block-editor > code[data-placeholder]:empty:not(:focus)::before {
    color: var(--theme-text-muted);
    content: attr(data-placeholder);
    pointer-events: none;
}

.board-markdown pre.board-code-runtime-cell {
    display: grid;
    grid-template-rows: auto auto auto;
    min-width: min(240px, 100%);
    padding: 0;
    overflow: hidden;
    white-space: normal;
}

.board-markdown pre.board-code-runtime-cell > code {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: calc(1lh + var(--type-space-compact) + var(--type-space-compact));
    padding: var(--type-space-compact) var(--type-space-content);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: pre;
}

.board-code-runtime-header {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: var(--type-notebook-control-height);
    align-items: center;
    justify-content: space-between;
    gap: var(--type-space-tight);
    box-sizing: border-box;
    padding: 2px var(--type-space-tight) 2px var(--type-space-compact);
    border-bottom: 1px solid var(--theme-code-border);
    background: var(--theme-code-header-bg);
    color: var(--theme-code-text);
    font-family: var(--body-font);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    white-space: nowrap;
}

.board-code-runtime-label {
    min-width: 0;
    overflow: hidden;
    font-family: var(--code-font);
    text-overflow: ellipsis;
}

.board-code-runtime-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--type-space-tight);
}

.board-code-runtime-button {
    height: var(--type-notebook-control-height);
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-control-border);
    border-radius: 4px;
    background: var(--theme-control-bg);
    color: var(--theme-text-strong);
    cursor: pointer;
    font-family: var(--body-font);
    font-size: inherit;
    font-weight: 400;
    line-height: var(--type-leading-ui);
}

.board-code-runtime-button:not(:disabled):is(:hover, :active) {
    background: var(--theme-control-hover);
}

.board-code-runtime-button:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 1px;
}

.board-code-runtime-button:disabled {
    background: var(--theme-control-muted-bg);
    color: var(--theme-control-disabled-text);
    cursor: wait;
}

.board-code-runtime-output {
    display: block;
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    min-height: calc(1lh + var(--type-space-compact) + var(--type-space-compact) + 1px);
    max-height: calc(10lh + var(--type-space-compact) + var(--type-space-compact) + 1px);
    box-sizing: border-box;
    padding: var(--type-space-compact) var(--type-space-content);
    overflow-x: auto;
    overflow-y: auto;
    border-top: 1px solid var(--theme-code-border);
    background: var(--theme-code-bg);
    color: var(--theme-code-text);
    font-family: var(--code-font);
    font-size: var(--type-size-code);
    line-height: var(--type-leading-reading);
    text-align: left;
    white-space: pre;
}

.board-code-runtime-output[hidden] {
    display: none;
}

.board-code-runtime-cell > code {
    grid-column: 1;
    grid-row: 2;
}

.board-code-runtime-text {
    display: block;
    margin: 0;
    color: inherit;
    overflow-wrap: normal;
    white-space: pre;
}

.board-code-runtime-text.is-error {
    color: var(--theme-error-text);
}

.board-code-runtime-text.is-status {
    color: var(--theme-text-secondary);
    font-family: var(--body-font);
}

.board-code-runtime-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: var(--type-space-tight) 0 0;
}

html[data-theme="dark"] .board-markdown .board-inline-code-block,
html[data-theme="dark"] .board-rich-editor .board-inline-code-block {
    border-color: var(--theme-code-border);
    background: var(--theme-code-bg);
    color: var(--theme-code-text);
}

html[data-theme="dark"] .board-markdown .board-inline-code-block > code,
html[data-theme="dark"] .board-rich-editor .board-inline-code-block > code {
    background: transparent;
    color: inherit;
}

.board-inline-code-block ::selection {
    background: var(--theme-code-selection-bg);
    color: inherit;
}

.board-inline-code-block-editor.is-resizing {
    cursor: ew-resize;
    user-select: none;
}

.board-inline-code-block-resize-handle {
    position: absolute;
    right: 2px;
    top: 50%;
    box-sizing: border-box;
    width: 10px;
    height: 28px;
    transform: translateY(-50%);
    border-right: 2px solid var(--theme-focus-ring);
    opacity: 0;
    cursor: ew-resize;
    touch-action: none;
    transition: opacity 120ms ease;
}

.board-inline-code-block-editor:is(:hover, :focus-within) .board-inline-code-block-resize-handle,
.board-inline-code-block-resize-handle:focus-visible {
    opacity: 1;
}

/* Board's editable code sample is intentionally quieter than syntax-highlighted
   notebook code, but it must remain legible on the dark code surface. */
.board-rich-editor pre {
    color: var(--theme-code-editor-text, var(--theme-code-text));
}

.board-markdown .resources-code-pre :is(.syntax-c, .syntax-ch, .syntax-cm, .syntax-cp, .syntax-cpf, .syntax-c1, .syntax-cs),
.board-rich-editor .resources-code-pre :is(.syntax-c, .syntax-ch, .syntax-cm, .syntax-cp, .syntax-cpf, .syntax-c1, .syntax-cs) {
    color: var(--theme-code-syntax-comment);
    font-style: italic;
}

.board-markdown .resources-code-pre :is(.syntax-k, .syntax-kp, .syntax-kr),
.board-rich-editor .resources-code-pre :is(.syntax-k, .syntax-kp, .syntax-kr) { color: var(--theme-code-syntax-control-keyword); }
.board-markdown .resources-code-pre :is(.syntax-kc, .syntax-kd, .syntax-kn, .syntax-kt, .syntax-bp),
.board-rich-editor .resources-code-pre :is(.syntax-kc, .syntax-kd, .syntax-kn, .syntax-kt, .syntax-bp) { color: var(--theme-code-syntax-keyword); }
.board-markdown .resources-code-pre :is(.syntax-nc, .syntax-ne, .syntax-nn),
.board-rich-editor .resources-code-pre :is(.syntax-nc, .syntax-ne, .syntax-nn) { color: var(--theme-code-syntax-type); }
.board-markdown .resources-code-pre :is(.syntax-nb, .syntax-nd, .syntax-nf, .syntax-fm),
.board-rich-editor .resources-code-pre :is(.syntax-nb, .syntax-nd, .syntax-nf, .syntax-fm) { color: var(--theme-code-syntax-function); }
.board-markdown .resources-code-pre .syntax-na,
.board-rich-editor .resources-code-pre .syntax-na { color: var(--theme-code-syntax-attribute); }
.board-markdown .resources-code-pre :is(.syntax-nv, .syntax-vc, .syntax-vg, .syntax-vi, .syntax-vm, .syntax-py),
.board-rich-editor .resources-code-pre :is(.syntax-nv, .syntax-vc, .syntax-vg, .syntax-vi, .syntax-vm, .syntax-py) { color: var(--theme-code-syntax-variable); }
.board-markdown .resources-code-pre :is(.syntax-no, .syntax-ss),
.board-rich-editor .resources-code-pre :is(.syntax-no, .syntax-ss) { color: var(--theme-code-syntax-constant); }
.board-markdown .resources-code-pre .syntax-nl,
.board-rich-editor .resources-code-pre .syntax-nl { color: var(--theme-code-syntax-label); }
.board-markdown .resources-code-pre .syntax-nt,
.board-rich-editor .resources-code-pre .syntax-nt { color: var(--theme-code-syntax-tag); }
.board-markdown .resources-code-pre :is(.syntax-m, .syntax-mb, .syntax-mf, .syntax-mh, .syntax-mi, .syntax-mo, .syntax-il),
.board-rich-editor .resources-code-pre :is(.syntax-m, .syntax-mb, .syntax-mf, .syntax-mh, .syntax-mi, .syntax-mo, .syntax-il) { color: var(--theme-code-syntax-number); }
.board-markdown .resources-code-pre :is(.syntax-s, .syntax-sa, .syntax-sb, .syntax-sc, .syntax-dl, .syntax-sd, .syntax-s2, .syntax-sh, .syntax-sx, .syntax-s1),
.board-rich-editor .resources-code-pre :is(.syntax-s, .syntax-sa, .syntax-sb, .syntax-sc, .syntax-dl, .syntax-sd, .syntax-s2, .syntax-sh, .syntax-sx, .syntax-s1) { color: var(--theme-code-syntax-string); }
.board-markdown .resources-code-pre .syntax-se,
.board-rich-editor .resources-code-pre .syntax-se { color: var(--theme-code-syntax-escape); }
.board-markdown .resources-code-pre .syntax-si,
.board-rich-editor .resources-code-pre .syntax-si { color: var(--theme-code-syntax-interpolation); }
.board-markdown .resources-code-pre .syntax-sr,
.board-rich-editor .resources-code-pre .syntax-sr { color: var(--theme-code-syntax-regex); }
.board-markdown .resources-code-pre :is(.syntax-o, .syntax-p),
.board-rich-editor .resources-code-pre :is(.syntax-o, .syntax-p) { color: var(--theme-code-syntax-operator); }
.board-markdown .resources-code-pre .syntax-ow,
.board-rich-editor .resources-code-pre .syntax-ow { color: var(--theme-code-syntax-word-operator); }
.board-markdown .resources-code-pre :is(.syntax-err, .syntax-gr, .syntax-gt),
.board-rich-editor .resources-code-pre :is(.syntax-err, .syntax-gr, .syntax-gt) { color: var(--theme-code-syntax-error); }
.board-markdown .resources-code-pre .syntax-w,
.board-rich-editor .resources-code-pre .syntax-w { color: var(--theme-code-syntax-muted); }

.board-inline-image-object-actions {
    position: absolute;
    z-index: 3;
    top: 2px;
    left: 2px;
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--theme-border-soft);
    border-radius: 4px;
    background: var(--theme-surface);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.board-inline-image-editor.is-selected .board-inline-image-object-actions,
.board-inline-image-object-actions:focus-within {
    opacity: 1;
    pointer-events: auto;
}

.board-inline-image-object-action {
    display: grid;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    place-items: center;
}

.board-inline-image-object-action[aria-pressed="true"],
.board-inline-image-object-action:is(:hover, :focus-visible) {
    border-color: var(--theme-focus-ring);
    background: var(--theme-surface-hover);
}

.board-inline-image-object-action.board-inline-image-remove-action {
    color: var(--theme-error-text);
}

.board-inline-image-object-action.board-inline-image-remove-action:is(:hover, :focus-visible) {
    border-color: var(--theme-error-text);
    background: var(--theme-error-surface);
}

.board-inline-image-object-action-icon {
    display: block;
    width: 12px;
    height: 12px;
    pointer-events: none;
}

html[data-theme="dark"] .board-inline-image-object-action-icon {
    filter: invert(1);
}

.board-markdown table {
    display: inline-table;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.board-markdown table.board-table-equal-columns {
    width: 100%;
    table-layout: fixed;
}

.board-markdown table.board-table-column-widths,
.board-rich-editor table.board-table-column-widths {
    table-layout: fixed;
}

.board-markdown table.board-table-equal-rows tr {
    height: 2.2em;
}

.board-markdown :is(th, td) {
    padding: var(--type-space-tight) var(--type-space-compact);
    border: 1px solid var(--theme-divider-soft);
    color: inherit;
    font-size: inherit;
    vertical-align: top;
}

/* A table is an atomic inline object. ProseMirror owns its internal editing,
   while the containing text line owns placement and paragraph alignment. */
.board-inline-object-line {
    min-width: 0;
}

.board-inline-table {
    display: inline-grid;
    box-sizing: border-box;
    max-width: 100%;
    margin-inline: 0.2em;
    overflow: auto;
    border-top: 1px solid var(--theme-divider-soft);
    border-inline-start: 1px solid var(--theme-divider-soft);
    vertical-align: text-bottom;
}

.board-inline-table-cell {
    display: grid;
    box-sizing: border-box;
    min-width: 48px;
    padding: var(--type-space-tight) var(--type-space-compact);
    overflow: auto;
    border-inline-end: 1px solid var(--theme-divider-soft);
    border-bottom: 1px solid var(--theme-divider-soft);
    color: inherit;
    font-size: inherit;
    text-align: start;
    overflow-wrap: anywhere;
    align-content: start;
}

.board-inline-table-cell[data-board-vertical-align="middle"] {
    align-content: safe center;
}

.board-inline-table-cell[data-board-vertical-align="bottom"] {
    align-content: safe end;
}

.board-inline-table-cell[role="columnheader"] {
    font-weight: 700;
}

.board-markdown [data-board-text-align="center"] {
    text-align: center;
}

.board-markdown [data-board-text-align="right"] {
    text-align: right;
}

.board-markdown [data-board-text-align="justify"] {
    text-align: justify;
}

.board-prosemirror-table {
    display: inline-block;
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin-inline: 0.2em;
    overflow-x: auto;
    content-visibility: visible;
    vertical-align: text-bottom;
}

.board-prosemirror-table[data-board-table-object-selected="true"] {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 3px;
}

.board-prosemirror-table-mount {
    min-width: max-content;
    padding-inline-end: 6px;
    padding-block-end: 6px;
}

.board-prosemirror-table .ProseMirror {
    min-width: max-content;
    outline: 0;
}

/* Real transparent handles keep the collapsed right and bottom borders
   draggable even when the browser reports an outside-border pointer target. */
.board-prosemirror-table .tableWrapper {
    position: relative;
    width: fit-content;
    overflow: visible;
}

.board-table-outer-resize-handle {
    position: absolute;
    z-index: 3;
    display: block;
    touch-action: none;
}

.board-table-outer-resize-handle.is-width {
    inset-block: 0 -6px;
    inset-inline-end: -6px;
    width: 16px;
    cursor: ew-resize;
}

.board-table-outer-resize-handle.is-height {
    inset-inline: 0 -6px;
    inset-block-end: -6px;
    height: 16px;
    cursor: ns-resize;
}

.board-rich-editor .board-prosemirror-table table {
    display: table;
    max-width: none;
    overflow: visible;
    position: relative;
    border-collapse: collapse;
    user-select: text;
}

.board-prosemirror-table :is(th, td) {
    position: relative;
    min-width: 48px;
    padding: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    user-select: text;
    vertical-align: top;
}

/* Keep the requested row geometry authoritative after equal distribution.
   If a user deliberately makes a row shorter than its content, the content
   remains editable in a local scroll area instead of forcing the divider back. */
.board-table-cell-content {
    display: grid;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: var(--type-space-tight) var(--type-space-compact);
    overflow-y: auto;
    align-content: start;
}

.board-prosemirror-table :is(th, td)[data-board-vertical-align="middle"] > .board-table-cell-content {
    align-content: safe center;
}

.board-prosemirror-table :is(th, td)[data-board-vertical-align="bottom"] > .board-table-cell-content {
    align-content: safe end;
}

.board-prosemirror-table :is(th, td)[data-rowheight] > .board-table-cell-content {
    height: calc(var(--board-table-cell-height) - 2px);
    max-height: calc(var(--board-table-cell-height) - 2px);
}

.board-table-cell-content > :first-child {
    margin-block-start: 0;
}

.board-table-cell-content > :last-child {
    margin-block-end: 0;
}

.board-prosemirror-table .selectedCell::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    box-sizing: border-box;
    border: 2px solid var(--theme-focus-ring);
    background: var(--theme-accent-surface-strong);
    content: "";
    pointer-events: none;
}

.board-prosemirror-table .ProseMirror.is-board-column-resize-hover,
.board-prosemirror-table .ProseMirror.is-board-column-resize-hover *,
.board-prosemirror-table .ProseMirror.is-board-column-resizing,
.board-prosemirror-table .ProseMirror.is-board-column-resizing * {
    cursor: col-resize;
}

.board-prosemirror-table .ProseMirror.is-board-row-resize-hover,
.board-prosemirror-table .ProseMirror.is-board-row-resize-hover *,
.board-prosemirror-table .ProseMirror.is-board-row-resizing,
.board-prosemirror-table .ProseMirror.is-board-row-resizing * {
    cursor: row-resize;
}

.board-prosemirror-table .ProseMirror:is(.is-board-column-resizing, .is-board-row-resizing),
.board-prosemirror-table .ProseMirror:is(.is-board-column-resizing, .is-board-row-resizing) * {
    user-select: none;
}

.board-prosemirror-table .ProseMirror:is(.is-board-table-outer-resize-hover, .is-board-table-outer-resizing)[data-board-table-outer-resize="width"],
.board-prosemirror-table .ProseMirror:is(.is-board-table-outer-resize-hover, .is-board-table-outer-resizing)[data-board-table-outer-resize="width"] * {
    cursor: ew-resize;
}

.board-prosemirror-table .ProseMirror:is(.is-board-table-outer-resize-hover, .is-board-table-outer-resizing)[data-board-table-outer-resize="height"],
.board-prosemirror-table .ProseMirror:is(.is-board-table-outer-resize-hover, .is-board-table-outer-resizing)[data-board-table-outer-resize="height"] * {
    cursor: ns-resize;
}

.board-prosemirror-table .ProseMirror:is(.is-board-table-outer-resize-hover, .is-board-table-outer-resizing)[data-board-table-outer-resize="both"],
.board-prosemirror-table .ProseMirror:is(.is-board-table-outer-resize-hover, .is-board-table-outer-resizing)[data-board-table-outer-resize="both"] * {
    cursor: nwse-resize;
}

.board-prosemirror-table .ProseMirror.is-board-table-outer-resizing,
.board-prosemirror-table .ProseMirror.is-board-table-outer-resizing * {
    user-select: none;
}

.board-rich-editor :is(th, td).is-board-table-cell-selected {
    background: var(--theme-accent-surface-strong);
    box-shadow: inset 0 0 0 2px var(--theme-focus-ring);
}

.board-rich-editor table { user-select: none; }

.board-rich-editor table[data-board-table-resize-edge="width"],
.board-rich-editor table[data-board-table-resize-edge="width"] *,
.board-rich-editor table[data-board-table-resizing="width"],
.board-rich-editor table[data-board-table-resizing="width"] * {
    cursor: ew-resize;
}

.board-rich-editor table[data-board-table-resize-edge="column"],
.board-rich-editor table[data-board-table-resize-edge="column"] *,
.board-rich-editor table[data-board-table-resizing="column"],
.board-rich-editor table[data-board-table-resizing="column"] * {
    cursor: ew-resize;
}

.board-rich-editor table[data-board-table-resize-edge="height"],
.board-rich-editor table[data-board-table-resize-edge="height"] *,
.board-rich-editor table[data-board-table-resizing="height"],
.board-rich-editor table[data-board-table-resizing="height"] * {
    cursor: ns-resize;
}

.board-rich-editor table[data-board-table-resize-edge="both"],
.board-rich-editor table[data-board-table-resize-edge="both"] *,
.board-rich-editor table[data-board-table-resizing="both"],
.board-rich-editor table[data-board-table-resizing="both"] * {
    cursor: nwse-resize;
}

.board-rich-editor table[data-board-table-resizing] {
    box-shadow: 0 0 0 2px var(--theme-focus-ring);
    touch-action: none;
}

.board-rich-editor :is(th, td)[data-board-table-editing="true"] {
    user-select: text;
    cursor: text;
}

.board-markdown .board-text-small {
    font-size: 13px;
}

.board-markdown .board-text-large {
    font-size: 17px;
}

/* Use a quiet but visible rhythm between different Markdown block types. */
.board-markdown :is(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, pre, table, hr) {
    margin-block: 0;
}

.board-markdown > * + * {
    margin-top: var(--type-space-content);
}

.board-markdown > :is(p + p, blockquote + blockquote, ul + ul, ol + ol) {
    margin-top: var(--type-space-compact);
}

/* Lists stay in the editor's continuous text rhythm. The Markdown blank line
   needed to terminate a list must not become an extra visual gap. */
.board-markdown > :is(p, ul, ol) + :is(ul, ol),
.board-markdown > :is(ul, ol) + :is(p, ul, ol) {
    margin-top: 0;
}

/* The editor is a continuous writing surface. Changing a line into a quote,
   bullet list, or numbered list must not make adjacent lines jump vertically. */
#content-window .board-rich-editor.board-markdown.type-content-flow > :is(p, div, blockquote, ul, ol) {
    margin-block: 0;
    line-height: var(--board-content-line-height);
}

#content-window .board-rich-editor.board-markdown.type-content-flow
> :is(p, div, blockquote, ul, ol) + :is(p, div, blockquote, ul, ol) {
    margin-top: 0;
}

#content-window .board-rich-editor.board-markdown.type-content-flow :is(ul, ol, li) {
    margin-block: 0;
    color: var(--theme-text);
    line-height: var(--board-content-line-height);
    opacity: 1;
}

/* Tables and horizontal dividers are top-level separators: the next typing
   line keeps the shared block gap. Quotes and lists remain in text rhythm. */
#content-window .board-rich-editor.board-markdown.type-content-flow
> :is(table, hr) + :is(p, div) {
    margin-top: var(--type-space-content);
}

/* Toolbar-inserted block objects keep a compact gap to their dedicated caret line. */
#content-window .board-rich-editor.board-markdown.type-content-flow
> :is(p, div, blockquote, ul.task-list, pre, hr) + :is(blockquote, ul.task-list, pre, hr),
#content-window .board-rich-editor.board-markdown.type-content-flow
> :is(blockquote, ul.task-list, pre, hr) + :is(p, div) {
    margin-top: 0;
}

.board-markdown :is(blockquote, li) > :first-child {
    margin-top: 0;
}

.board-markdown :is(blockquote, li) > :last-child {
    margin-bottom: 0;
}

.board-markdown li + li {
    margin-top: var(--type-space-tight);
}

/* Nested list items use the same continuous rhythm as the rich editor. */
.board-markdown :is(ul, ol) > li + li,
.board-markdown :is(ul, ol) > li > :is(ul, ol) {
    margin-block: 0;
}

/* Saved rich-editor content must not synthesize a paragraph-sized gap between
   blocks. An explicit blank paragraph still keeps its own line height. */
.board-markdown.type-content-flow > * + *,
.board-markdown.type-content-flow li + li {
    margin-top: 0;
}

/* style_typography.css scopes the shared rhythm from #content-window, so the
   saved Board content needs the same scope to keep this override effective. */
#content-window .board-markdown.type-content-flow > * + *,
#content-window .board-markdown.type-content-flow li + li {
    margin-top: 0;
}

/* A prose Tab is stored as one EM plus one EN space (1.5em). Keep those
   source characters visible on the first line while giving automatic wrapped
   continuation lines the same text inset in both editor and posted content. */
.board-markdown.type-content-flow > [data-board-prose-indent-depth] {
    box-sizing: border-box;
    padding-inline-start: var(--board-prose-wrap-indent, 0);
    text-indent: calc(0px - var(--board-prose-wrap-indent, 0px));
}

.board-markdown.type-content-flow > [data-board-prose-indent-depth="1"] {
    --board-prose-wrap-indent: 1.5em;
}

.board-markdown.type-content-flow > [data-board-prose-indent-depth="2"] {
    --board-prose-wrap-indent: 3em;
}

.board-markdown.type-content-flow > [data-board-prose-indent-depth="3"] {
    --board-prose-wrap-indent: 4.5em;
}

.board-markdown.type-content-flow > [data-board-prose-indent-depth="4"] {
    --board-prose-wrap-indent: 6em;
}

.board-markdown.type-content-flow > [data-board-prose-indent-depth="5"] {
    --board-prose-wrap-indent: 7.5em;
}

.board-markdown.type-content-flow > [data-board-prose-indent-depth="6"] {
    --board-prose-wrap-indent: 9em;
}

.board-markdown.type-content-flow > [data-board-prose-indent-depth="7"] {
    --board-prose-wrap-indent: 10.5em;
}

.board-markdown.type-content-flow > [data-board-prose-indent-depth="8"] {
    --board-prose-wrap-indent: 12em;
}

/* Apply saved blank-line spacing after the zero-gap rhythm rule above and at
   a higher specificity. Otherwise that shared rule visually collapses the
   line even though the rendered DOM and copied text still contain it. */
#content-window .board-post-content.board-markdown.type-content-flow
> [data-board-editor-blank-line="true"] {
    display: block;
    height: 1.3em;
    min-height: 1.3em;
    line-height: 1.3em;
    margin-block: 0;
}

#content-window .board-post-content.board-markdown.type-content-flow
> [data-board-editor-blank-line="true"] > br {
    display: none;
}

#content-window .board-post-content.board-markdown.type-content-flow
> [data-board-half-line-break="true"] {
    display: block;
    height: 0.65em;
    min-height: 0.65em;
    line-height: 0.65em;
    margin-block: 0;
}

#content-window .board-post-content.board-markdown.type-content-flow
> [data-board-half-line-break="true"] > br {
    display: none;
}

.board-rich-editor.board-markdown.type-content-flow
> p[data-board-half-line-break="true"],
.board-markdown.type-content-flow
> p[data-board-half-line-break="true"] {
    height: 0.65em;
    min-height: 0.65em;
    line-height: 0.65em;
    margin-block: 0;
}

/* The editor additionally uses half-size type so its caret is half-height. */
.board-rich-editor.board-markdown.type-content-flow
> p[data-board-half-line-break="true"] {
    font-size: 50%;
    height: 1.3em;
    min-height: 1.3em;
    line-height: 1.3em;
}

#content-window .board-post-content.board-markdown.type-content-flow
> p:not([data-board-editor-blank-line]):not([data-board-half-line-break])
+ p:not([data-board-editor-blank-line]):not([data-board-half-line-break]) {
    margin-top: 1.3em;
}

.board-markdown .task-list-item,
.board-markdown li:has(> input[type="checkbox"]) {
    list-style: none;
}

.board-markdown .task-list-item input[type="checkbox"],
.board-markdown li > input[type="checkbox"] {
    margin: 0 0.45em 0 -1.4em;
    accent-color: var(--theme-link, #0969da);
}

.board-markdown hr {
    border: 0;
    border-top: 1px solid var(--theme-divider-standard);
}

.board-rich-editor.board-markdown {
    margin: 0;
}

.board-attachment-list {
    display: grid;
    gap: 4px;
    margin: var(--type-space-content) 0 0 47px;
    padding: 0;
    list-style: none;
}

.board-attachment-list li {
    min-width: 0;
    font-size: var(--board-small-font-size);
}

/* Resource-rendered documents are a post-detail sibling, not a nested card. */
.board-document-attachments {
    min-width: 0;
    margin-top: var(--type-space-content);
}

.board-document-attachment-stack,
.board-document-attachment {
    min-width: 0;
}

.board-document-attachments + :is(.board-answer-composer, .board-replies) {
    margin-top: var(--type-space-content);
}

.board-attachment-image {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 var(--board-space-2);
    padding: var(--board-space-2);
    border: 1px solid var(--theme-border-soft, #d0d7de);
    border-radius: 6px;
    background: transparent;
}

.board-attachment-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.board-attachment-list a {
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-border-soft, #d0d7de);
    border-radius: 5px;
    background: var(--theme-surface-muted, #f6f8fa);
    color: var(--theme-text, #000000);
    font-size: inherit;
}

.board-attachment-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-attachment-size {
    color: var(--theme-text-muted, #555555);
    white-space: nowrap;
}

.board-markdown .katex-display,
.board-document-attachment .katex-display {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-block: var(--type-space-tight);
}

.board-equation-dialog {
    box-sizing: border-box;
    width: min(760px, calc(100% - (2 * var(--type-space-page))));
    max-width: 100%;
    height: fit-content;
    max-height: calc(100dvh - (2 * var(--type-space-page)));
    margin: auto;
    padding: var(--type-space-page);
    padding-block-end: var(--type-space-compact);
    overflow-y: auto;
    border: 1px solid var(--theme-border-soft);
    border-radius: 6px;
    background: var(--theme-surface);
    color: var(--theme-text);
    font-family: var(--body-font);
    font-size: var(--board-font-size);
}

.board-equation-dialog::backdrop {
    background: var(--theme-overlay);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.board-ai-help-dialog {
    width: min(620px, calc(100% - (2 * var(--type-space-page))));
    max-width: 100%;
    max-height: calc(100dvh - (2 * var(--type-space-page)));
    margin: auto;
    padding: var(--type-space-page);
    overflow-y: auto;
    border: 1px solid var(--theme-border-soft);
    border-radius: 6px;
    background: var(--theme-surface);
    color: var(--theme-text);
    font-family: var(--body-font);
    font-size: var(--board-font-size);
    line-height: var(--board-content-line-height);
}

.board-ai-help-dialog::backdrop {
    background: var(--theme-overlay);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.board-ai-help-form,
.board-ai-help-header,
.board-ai-help-section {
    display: grid;
    gap: var(--type-space-compact);
}

.board-ai-help-header h2,
.board-ai-help-header p,
.board-ai-help-section h3,
.board-ai-help-section p,
.board-ai-help-list {
    margin: 0;
}

.board-ai-help-header h2 {
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.board-ai-help-section h3 {
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
}

.board-ai-help-header p {
    color: var(--theme-text-muted);
}

.board-ai-help-list {
    display: grid;
    gap: var(--type-space-compact);
    padding-inline-start: var(--type-indent-list);
}

.board-ai-help-list kbd {
    padding-block: 1px;
    padding-inline: 2px;
    border: 1px solid var(--theme-border-soft);
    border-radius: 3px;
    background: var(--theme-surface-muted);
    color: inherit;
    font-family: var(--body-font);
    font-size: inherit;
    line-height: 1;
    white-space: nowrap;
}

.board-ai-help-actions {
    display: flex;
    justify-content: end;
}

.board-ai-help-close {
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-secondary-button-border);
    border-radius: 5px;
    background: var(--theme-secondary-button-bg);
    color: var(--theme-text);
    cursor: pointer;
    font: inherit;
}

.board-ai-help-close:is(:hover, :focus-visible) {
    border-color: var(--theme-text-secondary);
    background: var(--theme-surface-hover);
}

.board-equation-form,
.board-equation-header,
.board-equation-field,
.board-equation-field-header {
    display: grid;
    gap: var(--type-space-tight);
}

.board-equation-form {
    grid-auto-rows: max-content;
    align-content: start;
    min-height: 0;
    gap: var(--type-space-compact);
}

.board-equation-header h2,
.board-equation-header p {
    margin: 0;
}

.board-equation-header h2 {
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.board-equation-header p {
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
}

.board-equation-field label,
.board-equation-mode > span,
.board-equation-scale > span,
.board-equation-palette-group h3 {
    font-size: var(--board-small-font-size);
    font-weight: 700;
}

.board-equation-field textarea,
.board-equation-mode select,
.board-equation-scale input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--theme-border-soft);
    border-radius: 5px;
    background: var(--theme-surface);
    color: var(--theme-text);
    font: inherit;
}

.board-equation-field textarea {
    height: 176px;
    min-height: 176px;
    max-height: 176px;
    padding: var(--type-space-content);
    resize: none;
    overflow-y: auto;
    font-family: var(--code-font);
}

.board-equation-field-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.board-equation-options {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: end;
    gap: var(--type-space-compact);
}

.board-equation-mode,
.board-equation-palettes,
.board-equation-palette-group {
    display: grid;
    gap: var(--type-space-tight);
}

.board-equation-mode,
.board-equation-scale {
    display: grid;
    grid-template-columns: max-content max-content;
    align-items: center;
    gap: var(--type-space-tight);
}

.board-equation-mode select,
.board-equation-scale input {
    box-sizing: border-box;
    height: 26px;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
}

.board-equation-mode select {
    inline-size: 126px;
}

.board-equation-scale input {
    inline-size: 58px;
}

.board-equation-palettes {
    align-content: start;
}

.board-equation-palette-tabs {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--type-space-tight);
}

.board-equation-palette-group[hidden] {
    display: none;
}

.board-equation-palette-group {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.board-equation-palette-section {
    display: grid;
    gap: var(--type-space-tight);
}

.board-equation-palette-section > h3 {
    margin: 0;
    color: var(--theme-text-muted);
    line-height: var(--type-leading-ui);
}

.board-equation-templates,
.board-equation-symbols {
    display: grid;
    grid-template-columns: repeat(auto-fill, 30px);
    gap: var(--type-space-tight);
}

.board-equation-templates button,
.board-equation-symbols button,
.board-equation-palette-tabs button,
.board-equation-cancel {
    border: 1px solid var(--theme-secondary-button-border);
    border-radius: 5px;
    background: var(--theme-secondary-button-bg);
    color: var(--theme-text);
    cursor: pointer;
    font: inherit;
    font-size: var(--board-small-font-size);
}

.board-equation-templates button,
.board-equation-symbols button {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 3px;
    place-items: center;
}

.board-equation-symbols button {
    font-size: 16px;
    line-height: 1;
}

.board-equation-symbols .board-equation-function-symbol {
    font-size: 10px;
    letter-spacing: -0.02em;
}

.board-equation-palette-tabs button {
    display: grid;
    grid-column: span 3;
    min-height: 28px;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    line-height: var(--type-leading-ui);
    text-align: center;
    text-wrap: balance;
    white-space: normal;
    place-items: center;
}

.board-equation-palette-tabs button:is(
    [data-board-equation-category-tab="structures"],
    [data-board-equation-category-tab="greek"],
    [data-board-equation-category-tab="operators"]
) {
    grid-column: span 4;
}

.board-equation-palette-tabs button[aria-selected="true"] {
    border-color: var(--theme-text);
    background: var(--theme-text);
    color: var(--theme-bg);
}

.board-equation-cancel {
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
}

.board-equation-templates button:is(:hover, :focus-visible),
.board-equation-symbols button:is(:hover, :focus-visible),
.board-equation-palette-tabs button:is(:hover, :focus-visible),
.board-equation-cancel:is(:hover, :focus-visible) {
    border-color: var(--theme-secondary-button-border-hover);
    background: var(--theme-surface-hover);
}

.board-equation-palette-tabs button[aria-selected="true"]:is(:hover, :focus-visible) {
    border-color: var(--theme-text);
    background: var(--theme-text);
    color: var(--theme-bg);
}

.board-equation-template-icon {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

html[data-theme="dark"] .board-equation-template-icon {
    filter: invert(1);
}

.board-equation-preview {
    box-sizing: border-box;
    width: 100%;
    height: 136px;
    min-height: 136px;
    max-height: 136px;
    padding: var(--type-space-content);
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid var(--theme-border-soft);
    border-radius: 6px;
    background: var(--theme-surface-muted);
    color: var(--theme-text);
    cursor: default;
    user-select: text;
}

.board-equation-preview:has(.katex) {
    color: var(--theme-text);
    font-size: var(--board-equation-scale, 100%);
}

.board-equation-preview.is-error {
    color: var(--theme-error-text);
}

.board-equation-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--type-space-tight);
    margin-block-end: 0;
}

@media (max-width: 460px) {
    .board-equation-field-header {
        grid-template-columns: minmax(0, 1fr);
    }

    .board-equation-options {
        grid-template-columns: minmax(0, 1fr) max-content;
        justify-content: stretch;
    }

    .board-equation-mode {
        grid-template-columns: max-content minmax(0, 1fr);
    }

    .board-equation-mode select {
        inline-size: 100%;
    }
}

.board-pagination {
    position: relative;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        var(--board-pagination-control-width)
        max-content
        var(--board-pagination-control-width)
        minmax(0, 1fr);
    align-items: center;
    column-gap: var(--type-space-compact);
    margin-top: 0;
    padding-top: var(--type-space-tight);
    padding-bottom: var(--type-space-content);
}

.board-pagination::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--theme-divider-standard);
    content: "";
    pointer-events: none;
}

@media (min-width: 901px) {
    .board-pagination::before {
        left: calc(-1 * var(--type-space-content));
    }
}

.board-page-summary {
    grid-column: 3;
    justify-self: center;
    color: var(--theme-text-muted);
    font-size: var(--board-small-font-size);
    line-height: var(--type-leading-ui);
    text-align: center;
    white-space: nowrap;
}

.board-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding-block: var(--type-control-padding-block);
    padding-inline: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--theme-text-strong);
    font: inherit;
    font-size: var(--board-small-font-size);
    line-height: var(--type-leading-ui);
    text-decoration: none;
}

.board-page-link-direction {
    width: var(--board-pagination-control-width);
    min-width: var(--board-pagination-control-width);
    white-space: nowrap;
}

.board-page-previous {
    grid-column: 2;
    justify-content: flex-end;
}

.board-page-next {
    grid-column: 4;
    justify-content: flex-start;
}

a.board-page-link:hover,
a.board-page-link:active {
    background: transparent;
    color: var(--theme-link-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* Global link states must never override the compact pagination geometry. */
.board-section a.board-page-link:is(:hover, :focus-visible, :active) {
    margin: 0;
    font-size: var(--board-small-font-size);
    line-height: var(--type-leading-ui);
}

a.board-page-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.board-page-link.is-disabled {
    background: transparent;
    color: var(--theme-control-disabled-text);
}

.board-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .board-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: var(--type-space-content);
    }

    .board-layout.is-sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: var(--type-space-content);
    }

    .board-sidebar-toggle,
    .board-layout.is-sidebar-collapsed .board-sidebar-toggle {
        position: relative;
        top: auto;
        left: auto;
        grid-column: 1;
        grid-row: 1;
        align-self: end;
        justify-self: end;
        width: 72px;
        height: 19px;
        margin-right: calc(-1 * var(--main-padding-right));
        margin-bottom: 1px;
        border-radius: 4px 4px 0 0;
    }

    .board-layout.is-sidebar-collapsed .board-sidebar-toggle {
        width: 82px;
    }

    .board-sidebar-toggle-label {
        display: inline;
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        letter-spacing: normal;
    }

    .board-sidebar {
        grid-column: 1;
        grid-row: 1;
        margin-right: calc(-1 * var(--main-padding-right));
        min-height: auto;
        padding-block: var(--type-sidebar-shell-padding-block);
        padding-inline: var(--type-sidebar-shell-padding-inline);
        align-self: auto;
        overflow: visible;
        background: transparent;
        color: var(--theme-text);
        border-bottom: 0;
    }

    .board-main {
        grid-column: 1;
        grid-row: 2;
        width: auto;
        min-height: 0;
        margin-top: 0;
        margin-left: calc(-1 * var(--main-padding-left));
        margin-right: calc(-1 * var(--main-padding-right));
        padding: var(--type-space-content);
    }

    .board-channel-list {
        display: grid;
        width: 100%;
        min-width: 0;
        gap: 0;
    }

    .board-channel-link {
        grid-template-columns: 25.92px minmax(0, 1fr);
    }

}

@media (max-width: 560px) {
    .board-post-list {
        --board-post-tree-step: 12px;
    }

    .board-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .board-editor-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .board-submit {
        align-self: stretch;
    }

    .board-reply-list.has-replies,
    .board-reply-children {
        margin-inline-start: var(--type-space-compact);
        padding-inline-start: var(--type-space-compact);
    }

    .board-reply-list.has-replies > .board-reply::before,
    .board-reply-children > .board-reply::before {
        inset-inline-start: calc(-1 * var(--type-space-compact) - 1px);
        width: var(--type-space-compact);
    }

    .board-reply-list.has-replies > .board-reply:not(:last-child)::after,
    .board-reply-children > .board-reply:not(:last-child)::after {
        inset-inline-start: calc(-1 * var(--type-space-compact) - 1px);
    }

    .board-post-identity {
        gap: 7px;
    }

    .board-post-identity time {
        display: none;
    }

    .board-markdown,
    .board-attachment-list {
        margin-left: 43px;
    }

    .board-rich-editor.board-markdown {
        margin-left: 0;
    }
}

@media print {
    .board-sidebar,
    .board-sidebar-toggle,
    .board-composer,
    .board-composer-body,
    .board-login-write,
    .board-login-prompt,
    .board-post-actions,
    .board-reply-composer,
    .board-child-reply-composer,
    .board-reply-form,
    .board-reply-edit-form,
    .board-reply-edit,
    .board-reply-delete,
    .board-reply-reply {
        display: none !important;
    }

    html[data-site-printing="true"] .board-main {
        display: block !important;
    }

    html[data-site-printing="true"] .board-detail-channel-header {
        display: none !important;
    }

    html[data-site-printing="true"] .board-detail {
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    html[data-site-printing="true"] #board-print-content .resources-notebook-cell {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .board-header {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html[data-site-printing="true"] .board-detail-toolbar {
        display: none !important;
    }

    html[data-site-printing="true"] .board-markdown :is(
        .board-inline-code-block,
        .board-inline-table,
        .board-prosemirror-table
    ) {
        max-height: none !important;
        overflow: visible !important;
    }

    .board-layout {
        display: block;
    }
}
