.tm-forum-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px clamp(14px, 3vw, 28px) 42px;
    color: #0d2854;
}
body.page-id-1553 .tm-page-hero {
    min-height: 0 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}
body.page-id-1553 .tm-page-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem) !important;
    line-height: 1.1 !important;
}
body.page-id-1553 {
    --keycap-height: 42px;
    --keycap-font-size: 18px;
    --keycap-shift-font-size: 9px;
    --keycap-small-font-size: 9px;
    --keycap-extra-small-font-size: 9px;
    --keyboard-toolbar-font-size: 14px;
    --keycap-gap: 4px;
    --keyboard-padding-top: 4px;
    --keyboard-padding-bottom: 6px;
}
.tm-forum-hero,
.tm-forum-login {
    border: 1px solid rgba(20, 91, 200, .16);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(231, 252, 251, .88), rgba(247, 250, 255, .94));
    margin-bottom: 22px;
}
.tm-forum-hero {
    padding: 11px 16px;
    max-width: 920px;
    margin: 0 auto 12px;
}
.tm-forum-login {
    padding: clamp(20px, 4vw, 40px);
}
.tm-forum-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.tm-forum-eyebrow {
    margin: 0 0 3px;
    color: #08979a;
    font-size: .66rem;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.tm-forum-login h1,
.tm-forum-thread h1 {
    margin: 0;
    color: #082b66;
    font-size: clamp(2rem, 4.2vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: 0;
}
.tm-forum-hero h1 {
    margin: 0;
    color: #082b66;
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    line-height: 1.18;
    letter-spacing: 0;
}
.tm-forum-hero p,
.tm-forum-login p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #526983;
    font-weight: 750;
    line-height: 1.55;
}
.tm-forum-hero p {
    margin-top: 4px;
    font-size: .82rem;
    line-height: 1.35;
}
.tm-forum-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    max-width: 920px;
    margin: 0 auto;
}
.tm-forum-main > h2,
.tm-forum-compose > h2,
.tm-forum-replies > h2,
.tm-forum-reply-form > h2 {
    margin: 0 0 12px;
    color: #082b66;
    font-size: 1.45rem;
}
.tm-forum-topic-list {
    display: grid;
    gap: 12px;
}
.tm-forum-topic-card,
.tm-forum-compose,
.tm-forum-thread,
.tm-forum-reply,
.tm-forum-reply-form,
.tm-forum-empty,
.tm-forum-notice {
    border: 1px solid rgba(20, 91, 200, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.tm-forum-topic-card a {
    display: grid;
    gap: 7px;
    padding: 18px;
    color: inherit;
    text-decoration: none;
}
.tm-forum-topic-card span,
.tm-forum-notice {
    color: #07979a;
    font-weight: 900;
}
.tm-forum-topic-card strong {
    color: #082b66;
    font-size: 1.12rem;
}
.tm-forum-topic-card p,
.tm-forum-topic-card small,
.tm-forum-thread small,
.tm-forum-reply small {
    margin: 0;
    color: #64748b;
    font-weight: 750;
}
.tm-forum-compose,
.tm-forum-thread,
.tm-forum-reply-form {
    padding: 18px;
}
.tm-forum-compose {
    padding: 14px !important;
}
.tm-forum-compose > h2 {
    margin: 0 0 8px !important;
    font-size: 1.3rem !important;
    line-height: 1.2 !important;
}
.tm-forum-thread {
    margin-bottom: 18px;
}
.tm-forum-thread header,
.tm-forum-reply header {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}
.tm-forum-thread h1 {
    font-size: clamp(1.8rem, 3vw, 3.4rem);
}
.tm-forum-content {
    color: #1f2937;
    font-size: 1.03rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}
.tm-forum-content mjx-container[display="true"],
.tm-forum-preview mjx-container[display="true"] {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.tm-forum-form {
    display: grid;
    gap: 10px;
}
.tm-forum-form label {
    display: grid;
    gap: 7px;
    color: #0d2854;
    font-weight: 900;
    font-size: .88rem;
}
.tm-forum-form input[type="text"] {
    width: 100%;
    border: 1px solid #d4e2f6;
    border-radius: 8px;
    background: #f8fbff;
    color: #0d2854;
    font: inherit;
    font-weight: 750;
    outline: none;
}
.tm-forum-form input[type="text"] {
    min-height: 44px;
    padding: 0 14px;
}
.tm-forum-form input[type="text"]:focus {
    border-color: #14b8c4;
    box-shadow: 0 0 0 4px rgba(20, 184, 196, .12);
}
.tm-forum-editor {
    border: 1px solid #d4e2f6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.tm-forum-toolbar {
    display: flex;
    gap: 7px;
    padding: 10px;
    overflow-x: auto;
    border-bottom: 1px solid #e4ecf8;
    background: linear-gradient(135deg, #f7fbff, #effdfa);
}
.tm-forum-toolbar button,
.tm-forum-edit-link,
.tm-forum-trash button {
    flex: 0 0 auto;
    border: 1px solid #d4e2f6;
    border-radius: 8px;
    background: #fff;
    color: #0b4ea2;
    cursor: pointer;
    font-weight: 900;
    padding: 8px 10px;
}
.tm-forum-toolbar button:hover,
.tm-forum-edit-link:hover,
.tm-forum-trash button:hover {
    border-color: #14b8c4;
    color: #0f8f96;
}
.tm-forum-preview-wrap {
    border-bottom: 1px solid #e4ecf8;
    background: #fbfdff;
    padding: 9px 14px 10px;
}
.tm-forum-preview-label {
    margin-bottom: 8px;
    color: #08979a;
    font-size: .74rem;
    font-weight: 950;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.tm-forum-preview {
    min-height: 54px;
    color: #1f2937;
    line-height: 1.7;
    overflow-wrap: break-word;
}
.tm-forum-preview-math.is-inline {
    display: inline-flex;
    max-width: 100%;
    vertical-align: middle;
}
.tm-forum-preview-math.is-display {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 8px 0;
}
.tm-forum-preview-math svg {
    max-width: 100%;
}
.tm-forum-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #145bc8, #14b8c4);
    color: #fff !important;
    cursor: pointer;
    font-weight: 950;
    padding: 0 22px;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(20, 91, 200, .16);
}
.tm-forum-back {
    display: inline-flex;
    margin-bottom: 14px;
    color: #0b4ea2;
    font-weight: 900;
    text-decoration: none;
}
.tm-forum-replies {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}
.tm-forum-reply {
    padding: 16px;
}
.tm-forum-empty,
.tm-forum-notice {
    padding: 15px;
}
.tm-forum-post-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.tm-forum-edit-link {
    text-decoration: none;
}
.tm-forum-trash {
    margin: 0;
}
.tm-forum-trash button {
    color: #b42318;
}
.tm-forum-edit-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e4ecf8;
}
.tm-forum-edit-form h3 {
    margin: 0;
}
.tm-forum-edit-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
}
.tm-forum-edit-buttons > a {
    color: #526987;
    font-weight: 800;
}
.tm-material-dropdown {
    position: relative;
    padding-bottom: 8px;
    margin-bottom: -8px;
}
.tm-material-dropdown > a {
    cursor: pointer;
}

.tm-material-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.tm-material-dropdown > a::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}
.tm-material-dropdown:hover > a::after,
.tm-material-dropdown:focus-within > a::after,
.tm-material-dropdown.is-open > a::after {
    transform: rotate(225deg) translateY(-1px);
}
.tm-material-dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% - 2px);
    z-index: 9999;
    min-width: 190px;
    display: none;
    padding: 8px;
    border: 1px solid #dbe7f8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .14);
}
.tm-material-dropdown:hover .tm-material-dropdown-menu,
.tm-material-dropdown:focus-within .tm-material-dropdown-menu,
.tm-material-dropdown.is-open .tm-material-dropdown-menu {
    display: grid;
    gap: 4px;
}
.tm-material-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #0d2854;
    text-decoration: none;
    white-space: nowrap;
}
.tm-material-dropdown-menu a:hover,
.tm-material-dropdown-menu a:focus {
    background: #eefbfb;
    color: #0f8f96;
}
@media (min-width: 769px) {
    .tm-class-material-mobile-item {
        display: none !important;
    }
}
@media (max-width: 768px) {
    body.page-id-1553 {
        --keycap-height: 36px;
        --keycap-font-size: 16px;
        --keycap-gap: 3px;
        --keyboard-toolbar-font-size: 13px;
        --keyboard-padding-top: 3px;
        --keyboard-padding-bottom: 4px;
    }
    .tm-forum-wrap {
        padding: 16px 12px 30px;
    }
    .tm-forum-layout,
    .tm-forum-login {
        grid-template-columns: 1fr;
        display: grid;
    }
    .tm-forum-compose,
    .tm-forum-thread,
    .tm-forum-reply-form {
        padding: 14px;
    }
    .tm-forum-toolbar {
        padding: 8px;
    }
    .tm-forum-toolbar button {
        padding: 7px 9px;
        font-size: .86rem;
    }
    .tm-material-dropdown {
        display: none !important;
    }
    .tm-class-material-mobile-item {
        display: list-item !important;
    }
}


/* WYSIWYG math editor */
.tm-forum-editor input[data-tm-forum-value] {
    display: none !important;
}
.tm-forum-toolbar {
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-bottom: 0;
    background: #eef8f4;
}
.tm-forum-toolbar button {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-size: .9rem;
    font-weight: 950;
    padding: 0 9px;
}
.tm-forum-toolbar button:hover,
.tm-forum-toolbar button:focus {
    background: #fff;
    color: #0b4ea2;
}
.tm-forum-insert-math {
    background: #fff !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
    color: #1f2937 !important;
    gap: 8px;
}
.tm-forum-insert-math span {
    color: #38aef0;
}
.tm-forum-wysiwyg {
    min-height: 270px;
    padding: 18px 20px;
    background: #fff;
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.75;
    outline: none;
}
.tm-forum-wysiwyg:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}
.tm-forum-wysiwyg:focus {
    box-shadow: inset 0 0 0 2px rgba(56, 174, 240, .55);
}
.tm-forum-wysiwyg.is-invalid {
    box-shadow: inset 0 0 0 2px rgba(180, 35, 24, .5);
}
.tm-math-token {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0 4px;
    padding: 2px 5px;
    border-radius: 6px;
    background: rgba(56, 174, 240, .08);
    cursor: pointer;
    vertical-align: middle;
}
.tm-math-token.is-display {
    display: block;
    margin: 12px 0;
    padding: 9px 12px;
    overflow-x: auto;
}
.tm-math-token:hover,
.tm-math-token:focus {
    box-shadow: 0 0 0 2px rgba(56, 174, 240, .35);
}
.tm-forum-math-popover {
    margin: 14px 0 0;
    width: 100%;
}
.tm-forum-math-shortcuts {
    display: flex;
    gap: 7px;
    margin-bottom: 8px;
}
.tm-forum-math-shortcuts button,
.tm-forum-math-row button {
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    font-weight: 950;
}
.tm-forum-math-shortcuts button {
    min-width: 50px;
    min-height: 38px;
    padding: 0 12px;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .08);
    font-size: 1rem;
}
.tm-forum-math-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    padding: 5px;
    border: 2px solid #38aef0;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
}
.tm-forum-math-row [data-math-display] {
    display: none !important;
}
.tm-forum-math-input {
    display: block;
    width: 100%;
    min-height: 82px;
    margin: 0;
    padding: 13px 14px;
    resize: vertical;
    border: 2px solid #38aef0;
    border-radius: 8px;
    background: #fff;
    color: #0d2854;
    font: 700 1rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    box-sizing: border-box;
}
math-field.tm-forum-math-input {
    display: block;
    font-size: 1.2rem;
}
.tm-forum-math-row button {
    min-height: 44px;
    padding: 0 12px;
    color: #38aef0;
}
.tm-forum-math-row [data-math-done] {
    background: #38aef0;
    color: #fff;
}
.tm-forum-math-row .is-active {
    background: #0b4ea2;
    color: #fff;
}
.tm-forum-dashboard-messages {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
    padding: 26px;
    border: 1px solid rgba(11, 78, 162, .14);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(231, 252, 250, .78), rgba(255, 255, 255, .96));
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}
.tm-forum-dashboard-messages h2 {
    margin: 4px 0 18px;
    color: #082b6f;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    line-height: 1.05;
}
.tm-forum-dashboard-empty {
    padding: 16px 18px;
    border: 1px solid rgba(11, 78, 162, .12);
    border-radius: 12px;
    background: #fff;
    color: #45617f;
    font-weight: 800;
}
.tm-forum-dashboard-list {
    display: grid;
    gap: 12px;
}
.tm-forum-dashboard-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(11, 78, 162, .12);
    border-radius: 14px;
    background: #fff;
}
.tm-forum-dashboard-item strong {
    display: block;
    color: #082b6f;
    font-size: 1.08rem;
}
.tm-forum-dashboard-item small {
    display: block;
    margin-top: 4px;
    color: #61728c;
    font-weight: 800;
}
.tm-forum-dashboard-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tm-forum-dashboard-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(11, 78, 162, .16);
    border-radius: 10px;
    color: #0b4ea2;
    background: #f8fbff;
    text-decoration: none;
    font-weight: 950;
}
.tm-forum-dashboard-actions a:first-child {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #0b62d8, #16bdc5);
}
@media (max-width: 768px) {
    .tm-forum-toolbar { padding: 6px 8px; gap: 5px; }
    .tm-forum-toolbar button { min-height: 32px; padding: 0 7px; }
    .tm-forum-wysiwyg { min-height: 220px; padding: 14px; }
    .tm-forum-math-popover { margin-left: 0; max-width: none; }
    .tm-forum-math-row { grid-template-columns: minmax(0, 1fr) 66px; gap: 5px; }
    .tm-forum-math-input { min-height: 74px; }
    .tm-forum-math-shortcuts button { min-width: 44px; min-height: 34px; padding: 0 9px; }
    .tm-forum-dashboard-messages { width: calc(100% - 20px); padding: 18px; }
    .tm-forum-dashboard-item { display: block; }
    .tm-forum-dashboard-actions { margin-top: 12px; }
}
