.forum-shell { min-height: 72vh; padding: clamp(34px, 6vw, 78px) 0 84px; }
.forum-shell [hidden], .forum-shell .is-hidden { display: none !important; }
.forum-hero, .forum-account-head { display: flex; justify-content: space-between; gap: 38px; align-items: flex-end; padding: 0 0 clamp(32px, 5vw, 58px); }
.forum-kicker { display: flex; align-items: center; gap: 9px; color: var(--brand-300); font-size: .72rem; font-weight: 800; letter-spacing: .13em; line-height: 1.4; text-transform: uppercase; }
.forum-kicker > span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-400); box-shadow: 0 0 0 5px rgba(147, 197, 253, .1); }
.forum-hero h1, .forum-post h1, .forum-auth h1, .forum-composer h1, .forum-account-head h1 { max-width: 760px; margin-top: 17px; font-size: clamp(2.45rem, 5.4vw, 4.6rem); letter-spacing: -.055em; line-height: 1.05; }
.forum-hero > div > p:last-child, .forum-account-head > div > p:last-child, .forum-auth > p, .forum-composer > p { max-width: 690px; margin-top: 18px; color: var(--muted); font-size: 1.03rem; line-height: 1.8; }
.forum-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 0 0 auto; }
.forum-actions form { margin: 0; }
.forum-actions .btn, .forum-form .btn { min-height: 46px; white-space: nowrap; }
.forum-rules { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 38px; padding: 26px 30px; margin-bottom: 54px; border: 1px solid #355176; border-radius: 16px; background: linear-gradient(120deg, rgba(27, 50, 85, .82), rgba(13, 24, 40, .85)); }
.forum-rules h2 { margin-top: 7px; font-size: 1.25rem; letter-spacing: -.025em; line-height: 1.35; }
.forum-rules > p { color: #c2d0e5; line-height: 1.75; }
.forum-library { padding-top: 34px; border-top: 1px solid var(--line); }
.forum-library-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.forum-library-head h2 { margin-top: 8px; font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.045em; line-height: 1.15; }
.forum-back { display: inline-flex; align-items: center; min-height: 42px; color: #b8d2ff; font-size: .88rem; font-weight: 750; }
.forum-community-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.forum-community { display: flex; flex-direction: column; min-height: 190px; padding: 23px; border: 1px solid #2c415f; border-radius: 15px; background: #0d192b; color: var(--ink); transition: border-color .18s, transform .18s, background .18s; }
.forum-community:hover { border-color: #7199d4; transform: translateY(-2px); background: #10223a; color: var(--ink); }
.forum-community span { font-size: 1.04rem; font-weight: 800; line-height: 1.3; }
.forum-community small { flex: 1; margin-top: 12px; color: #a8b9d2; font-size: .85rem; line-height: 1.65; }
.forum-community b { margin-top: 16px; color: #b9d3ff; font-size: .76rem; letter-spacing: .04em; }
.forum-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 20px; }
.forum-tools > span { color: var(--soft); font-size: .82rem; }
.forum-search { display: flex; align-items: center; width: min(100%, 360px); min-height: 48px; padding: 0 14px; border: 1px solid #2b405f; border-radius: 10px; background: #091526; }
.forum-search:focus-within { outline: 2px solid rgba(147, 197, 253, .38); border-color: var(--brand-400); }
.forum-search input { width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: .92rem; }
.forum-search input::placeholder { color: #8395b1; }
.forum-post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.forum-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 25px; border: 1px solid #293c59; border-radius: 15px; background: #0e1a2c; overflow-wrap: anywhere; }
.forum-card:hover { border-color: #5c80b5; }
.forum-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #a6c5f2; font-size: .72rem; font-weight: 750; letter-spacing: .04em; }
.forum-card-meta a { padding: 4px 8px; border-radius: 5px; background: #1d3353; color: #bed7ff; }
.forum-card h2 { margin-top: 17px; font-size: clamp(1.22rem, 2.4vw, 1.58rem); letter-spacing: -.035em; line-height: 1.22; }
.forum-card h2 a { color: #f4f7fd; }
.forum-card > p { flex: 1; margin-top: 12px; color: #adbed5; font-size: .91rem; line-height: 1.72; }
.forum-card footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #263a57; color: #91a4c0; font-size: .72rem; }
.forum-status { padding: 4px 8px; border-radius: 5px; font-size: .66rem; }
.forum-status.hidden { background: #4b2634; color: #ffc0c8; }
.forum-empty { padding: 48px 24px; border: 1px dashed #3a5375; border-radius: 15px; text-align: center; color: var(--muted); }
.forum-empty h3 { margin-bottom: 8px; color: var(--ink); font-size: 1.28rem; }
.forum-empty .btn { margin-top: 18px; }
.forum-post { max-width: 820px; margin: 0 auto; padding: 18px 0 30px; overflow-wrap: anywhere; }
.forum-post .forum-card-meta { margin-top: 28px; }
.forum-post h1 { margin-top: 16px; font-size: clamp(2.2rem, 5vw, 3.7rem); }
.forum-post-byline { margin-top: 17px; color: #96a9c5; font-size: .86rem; }
.forum-post-body { margin-top: 38px; color: #d9e1ef; font-size: 1.02rem; line-height: 1.85; }
.forum-post-body p, .forum-post-body ul { margin: 0 0 1.25em; }
.forum-post-body ul { padding-left: 1.45em; }
.forum-post-body h2, .forum-post-body h3 { margin: 1.6em 0 .55em; color: #f8fafc; line-height: 1.25; }
.forum-post .btn { margin-top: 18px; }
.forum-auth, .forum-composer { width: min(100%, 690px); margin: 0 auto; padding: clamp(28px, 5vw, 48px); border: 1px solid #2a4061; border-radius: 18px; background: #0c1829; }
.forum-auth h1, .forum-composer h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.forum-form { display: grid; gap: 20px; margin-top: 30px; }
.forum-form label { display: grid; gap: 8px; color: #cad6e8; font-size: .86rem; font-weight: 750; }
.forum-form input, .forum-form select, .forum-form textarea { width: 100%; border: 1px solid #314967; border-radius: 8px; background: #081423; color: var(--ink); font: inherit; font-weight: 400; line-height: 1.5; padding: 12px 13px; }
.forum-form input:focus, .forum-form select:focus, .forum-form textarea:focus { border-color: var(--brand-400); outline: 2px solid rgba(147, 197, 253, .24); outline-offset: 2px; }
.forum-form textarea { resize: vertical; min-height: 220px; }
.forum-form label small { color: #95a8c5; font-size: .78rem; font-weight: 400; line-height: 1.55; }
.forum-form .btn { justify-self: start; }
.forum-auth-switch { margin-top: 22px; font-size: .9rem; }
.forum-alert { margin-bottom: 24px; padding: 13px 16px; border: 1px solid #38629a; border-radius: 9px; background: #122743; color: #d7e8ff; }
.forum-alert.error { border-color: #8a3d4b; background: #351b26; color: #ffd4d9; }
.forum-edit-link { display: inline-flex; align-items: center; min-height: 28px; margin-top: -9px; color: #b7d2ff; font-size: .8rem; font-weight: 750; }
.forum-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 800px) {
    .forum-hero, .forum-account-head { align-items: flex-start; flex-direction: column; gap: 24px; }
    .forum-rules { grid-template-columns: 1fr; gap: 15px; padding: 24px; margin-bottom: 40px; }
    .forum-community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .forum-shell { padding-top: 28px; }
    .forum-hero h1, .forum-post h1, .forum-auth h1, .forum-composer h1, .forum-account-head h1 { font-size: clamp(2.1rem, 11vw, 3rem); }
    .forum-hero > div > p:last-child, .forum-account-head > div > p:last-child, .forum-auth > p, .forum-composer > p { font-size: .94rem; }
    .forum-actions { width: 100%; }
    .forum-actions .btn { flex: 1; justify-content: center; }
    .forum-community-grid, .forum-post-grid { grid-template-columns: 1fr; }
    .forum-community { min-height: 164px; }
    .forum-library-head { align-items: flex-start; flex-direction: column; gap: 10px; }
    .forum-tools { align-items: stretch; flex-direction: column; margin-top: 24px; }
    .forum-search { width: 100%; }
    .forum-card { padding: 21px; }
    .forum-auth, .forum-composer { padding: 26px 21px; border-radius: 14px; }
    .forum-post-body { font-size: .96rem; }
}

.forum-post-body ol, .forum-post-body blockquote, .forum-post-body pre { margin: 0 0 1.25em; }
.forum-post-body ol { padding-left: 1.45em; }
.forum-post-body blockquote { padding: 1px 0 1px 18px; border-left: 3px solid #527db9; color: #bdcde3; }
.forum-post-body pre { overflow-x: auto; padding: 15px; border: 1px solid #2b405f; border-radius: 8px; background: #081423; white-space: pre-wrap; }
.forum-post-body code { padding: .08em .28em; border-radius: 4px; background: #172944; font-size: .9em; }
.forum-post-body pre code { padding: 0; background: transparent; }
.forum-post-body a { color: #8fc0ff; text-decoration: underline; text-underline-offset: .14em; }
.forum-rich-field { display: grid; gap: 10px; }
.forum-field-label { display: block; color: #cad6e8; font-size: .86rem; font-weight: 750; }
.forum-rich-field > div:first-child small { display: block; margin-top: 5px; color: #95a8c5; font-size: .78rem; line-height: 1.55; }
.forum-rich-editor { overflow: hidden; border: 1px solid #314967; border-radius: 8px; background: #081423; }
.forum-rich-editor:focus-within { border-color: var(--brand-400); outline: 2px solid rgba(147, 197, 253, .24); outline-offset: 2px; }
.forum-rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-bottom: 1px solid #314967; background: #0b192b; }
.forum-rich-toolbar button { min-height: 32px; padding: 4px 9px; border: 1px solid #36547c; border-radius: 5px; background: #11243d; color: var(--ink); cursor: pointer; font: inherit; font-size: .83rem; }
.forum-rich-toolbar button:hover { border-color: var(--brand-400); color: #c7ddff; }
.forum-rich-link input { width: min(220px, 48vw); min-height: 32px; padding: 4px 8px; border: 1px solid #36547c; border-radius: 5px; background: #07111f; color: var(--ink); font: inherit; font-size: .83rem; }
.forum-rich-surface { min-height: 300px; padding: 15px; color: var(--ink); font-weight: 400; line-height: 1.65; overflow-wrap: anywhere; }
.forum-rich-surface:focus { outline: none; }
.forum-rich-surface > :first-child { margin-top: 0; }
.forum-rich-surface > :last-child { margin-bottom: 0; }
.forum-rich-surface p, .forum-rich-surface ul, .forum-rich-surface ol, .forum-rich-surface blockquote, .forum-rich-surface pre { margin: 0 0 1em; }
.forum-rich-surface h2, .forum-rich-surface h3, .forum-rich-surface h4 { margin: 1.3em 0 .55em; }
.forum-rich-surface h2 { font-size: 1.45rem; }
.forum-rich-surface h3 { font-size: 1.18rem; }
.forum-rich-surface h4 { font-size: 1rem; }
.forum-rich-surface ul, .forum-rich-surface ol { padding-left: 1.5em; }
.forum-rich-surface a { color: #8fc0ff; text-decoration: underline; }
.forum-rich-source { position: absolute; width: 1px !important; height: 1px; margin: -1px; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 620px) {
    .forum-rich-toolbar { gap: 5px; }
    .forum-rich-toolbar button { padding: 4px 7px; }
    .forum-rich-link { flex: 1 1 145px; }
    .forum-rich-link input { width: 100%; }
    .forum-rich-surface { min-height: 260px; }
}
