:root {
  color-scheme: dark;
  font-family: "TT Hoves", Arial, sans-serif;
  color: #eae2de;
  background: #09090a;
  --text: #eae2de;
  --bright: #fff;
  --muted: rgb(255 255 255 / 55%);
  --quiet: rgb(255 255 255 / 38%);
  --line: rgb(255 255 255 / 8%);
  --surface: rgb(255 255 255 / 5%);
  --hover: rgb(255 255 255 / 9%);
  --header: rgb(14 13 14 / 80%);
  --card: #121315;
  --block: rgb(10 11 12 / 42%);
  --panel: linear-gradient(201.408deg, #2c2f33 13.397%, #18191c 39.751%, #222428 57.321%, #131416 86.603%);
  --panel-long: linear-gradient(201.408deg, #2c2f33 5%, #18191c 31%, #222428 51%, #131416 94%);
  --gold: #e8c77f;
  --nav: #aba8b0;
}
:root[data-theme="light"] {
  color-scheme: light;
  color: #201c1d;
  background: #f2f0ef;
  --text: #201c1d;
  --bright: #171313;
  --muted: #615b5e;
  --quiet: #625d60;
  --line: rgb(25 20 21 / 15%);
  --surface: rgb(25 20 21 / 6%);
  --hover: rgb(25 20 21 / 11%);
  --header: #f9f6f5;
  --card: #fff;
  --block: rgb(255 255 255 / 70%);
  --panel: linear-gradient(201deg, #e8e4e4, #f6f3f2 60%, #eeebea);
  --panel-long: var(--panel);
  --nav: #534c51;
  --gold: #765217;
}
:root[data-role="guest"]:not([data-theme="light"]) { background: #0e0f10; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); }
p, h2, h3 { margin: 0; }
button, input, textarea, select { font: inherit; }
button { appearance: none; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #d4ae62; outline-offset: 2px; }
[hidden] { display: none !important; }
.icon { display: block; flex: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.shell { width: 92.5%; max-width: 1776px; margin: 10px auto 56px; }
.site-header { border: 1px solid var(--line); border-radius: 18px; background: var(--header); }
.masthead { display: grid; grid-template-columns: minmax(150px, 290px) repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; }
.logo-slot { background: #212121; border-radius: 32px; }
[data-role="guest"] .logo-slot { border-radius: 16px; }
.rfor-placement { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; border-radius: 18px; text-align: center; }
.rfor-placement--top { height: 98px; background: #212121; color: white; }
.rfor-placement-size { font-size: 14px; }
.rfor-placement--top .rfor-placement-size { color: rgb(255 255 255 / 55%); }
.rfor-placement--tall, .rfor-placement--box {
  background: linear-gradient(180deg, transparent 70%, rgb(212 174 98 / 16%)), linear-gradient(180deg, #1d1b18, #121212);
  border: 1px solid rgb(212 174 98 / 22%);
  color: #e8c77f;
}
.rfor-placement--tall { height: 600px; }
.rfor-placement--box { height: 250px; }
.rfor-placement-label { color: rgb(255 255 255 / 30%); font-size: 12px; }
.rfor-placement-rail .rfor-placement-size { color: rgb(232 199 127 / 55%); }
.header-bar { min-height: 65px; padding: 8px 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.header-nav, .header-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.header-nav { gap: 12px; }
.nav-link, .toolbar-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; font-size: 14px; border-radius: 32px; }
.nav-link { height: 36px; padding: 0 12px; color: var(--nav); }
.nav-link.is-current { color: #faf5f5; background: linear-gradient(#222023, #30030b); box-shadow: inset 0 1px rgb(255 255 255 / 8%); }
.nav-link:not(.is-current):hover, .toolbar-button:hover { background-color: var(--hover); }
.toolbar-button { height: 40px; background-color: var(--surface); padding: 0 12px; font-weight: 600; }
.search { display: flex; gap: 10px; align-items: center; width: clamp(150px, 18vw, 343px); height: 40px; border-radius: 32px; background: var(--surface); padding: 0 12px; }
.language { gap: 6px; padding: 0 8px 0 10px; }
.theme-switch { display: flex; gap: 2px; align-items: center; height: 40px; border-radius: 32px; background: var(--surface); padding: 4px; }
.theme-switch button { display: grid; place-items: center; border-radius: 32px; width: 32px; height: 32px; }
.theme-switch button[aria-pressed="true"], .theme-switch button:hover { background: var(--hover); }
.account-button { padding: 0 16px 0 0; }
.account-button img { object-fit: cover; border-radius: 32px 0 0 32px; }
.balance { color: var(--gold); }
.menu-button, .menu-button:hover { background: #fff; color: #000; }
.menu-button { padding-right: 16px; }
.auth-button, .auth-button:hover { background: linear-gradient(#e8c77f, #b98d3c); color: #2b1a05; }
.auth-button { padding: 0 16px 0 14px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-top: 26px; align-items: start; }
[data-role="guest"] .layout { margin-top: 16px; }
[data-role="guest"] .shell { margin-bottom: 40px; }
.feed, .rfor-placement-rail { display: grid; gap: 18px; min-width: 0; }
[data-role="guest"] .feed, .rfor-placement-rail { gap: 16px; }
.rfor-placement-rail { position: sticky; top: min(16px, calc(100dvh - 882px)); }
.panel { border: 2px solid var(--line); background: var(--panel); border-radius: 18px; padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 20px; line-height: 24px; font-weight: 600; flex: none; }
.news-panel { container-type: inline-size; }
.news-head { justify-content: space-between; }
.news-filters, .forum-tabs { display: flex; align-items: center; overflow-x: auto; scrollbar-width: thin; }
.news-filters { padding: 4px; gap: 2px; border-radius: 32px; border: 1px solid var(--line); background: rgb(0 0 0 / 55%); max-width: 100%; }
.news-filters button { display: flex; gap: 6px; align-items: center; height: 34px; padding: 0 12px; white-space: nowrap; border-radius: 34px; font-size: 14px; color: rgb(255 255 255 / 55%); }
.news-filters button:hover { background: rgb(255 255 255 / 9%); }
.news-filters button[aria-pressed="true"] { background: #f1efee; color: #121314; }
.filter-count { display: grid; place-items: center; height: 20px; min-width: 20px; padding: 0 5px; border-radius: 99px; font-size: 12px; color: #eae2de; background: rgb(255 255 255 / 10%); font-weight: 600; }
button[aria-pressed="true"] .filter-count { color: #121314; background: rgb(18 19 20 / 12%); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.news-card { display: grid; grid-template-rows: 24px 21px 20px 22px; align-items: center; gap: 8px; text-align: left; min-width: 0; padding: 16px; border-radius: 16px; background: var(--card); }
.news-card:hover { box-shadow: inset 0 0 0 1px var(--line); filter: brightness(1.09); }
.news-card-head, .news-footer, .news-author, .news-stat, .pinned { display: flex; align-items: center; min-width: 0; }
.news-card-head { gap: 8px; }
.news-time, .news-stat { color: var(--quiet); white-space: nowrap; font-size: 13px; }
.news-time { margin-left: auto; }
.news-footer { gap: 12px; }
.news-author { gap: 6px; margin-right: auto; font-size: 13px; }
.news-stat, .pinned { gap: 4px; flex: none; }
.pinned { font-size: 12px; font-weight: 600; color: var(--muted); }
.news-title, .topic-title { font-size: 16px; line-height: 21px; font-weight: 600; }
.news-summary, .message-text { font-size: 14px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.chip--platform { background: rgb(232 199 127 / 12%); color: #e8c77f; }
.chip--regulators { background: rgb(201 160 255 / 12%); color: #c9a0ff; }
.chip--companies { background: rgb(169 198 236 / 12%); color: #a9c6ec; }
.chip--markets { background: rgb(95 211 168 / 12%); color: #5fd3a8; }
.chip--guides { background: rgb(217 214 212 / 12%); color: #d9d6d4; }
.avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--avatar); font-size: 14px; font-weight: 600; }
.avatar--small { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; }
.person-name { color: var(--person); }
.person-red { --avatar: #fd002f; --person: #fd002f; }
.person-mint { --avatar: #4ba58a; --person: #4ba58a; }
.person-gold { --avatar: #d4ae62; --person: #e8c77f; }
.person-ochre { --avatar: #b98d3c; --person: #e8c77f; }
.avatar.person-ochre:not(.avatar--small) { background: linear-gradient(#e8c77f, #b98d3c); }
.person-purple { --avatar: #a732ff; --person: #c86cff; }
.person-neutral { --avatar: #3a3c40; --person: var(--text); }
.person-blue { --avatar: #3c6ca3; --person: #a9c6ec; }
[data-theme="light"] .chip { filter: brightness(.53); }
[data-theme="light"] .person-name { filter: brightness(.58); }
[data-theme="light"] .person-neutral { filter: none; }

.forums-panel { background: var(--panel-long); }
.forums-head { gap: 24px; color: var(--bright); }
[data-role="guest"] .forums-head { color: var(--text); }
.forum-tabs { gap: 4px; }
.forum-tabs button { height: 37px; border-radius: 8px; padding: 0 14px; color: #b9b9c1; white-space: nowrap; }
.forum-tabs button:hover { background: var(--hover); }
.forum-tabs button[aria-pressed="true"] { background: #3a3b41; color: #f5f4f6; font-weight: 600; }
[data-theme="light"] .forum-tabs button:not([aria-pressed="true"]) { color: var(--muted); }
.forums-content { display: grid; gap: 16px; }
.forum-group { display: grid; gap: 10px; }
.forum-group > h3 { text-transform: uppercase; font-size: 13px; line-height: 15px; color: var(--quiet); font-weight: 600; }
.forum-block { border: 1px solid rgb(255 255 255 / 5%); border-radius: 24px; background: var(--block); overflow: hidden; }
.forum-header { display: flex; align-items: center; gap: 14px; min-height: 74px; padding: 14px 16px; }
.forum-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; background: linear-gradient(225deg, var(--icon-bg) 14.645%, #141517 85.355%); }
.forum-icon--gold { --icon-bg: #3a362c; }
.forum-icon--neutral { --icon-bg: #373839; }
.forum-icon--blue { --icon-bg: #2f353d; }
.forum-icon--purple { --icon-bg: #352e41; }
.forum-icon--mint { --icon-bg: #223731; }
.forum-name { flex: 1; min-width: 0; }
.forum-name h3 { font-size: 18px; line-height: 21px; font-weight: 600; }
.forum-name p { margin-top: 2px; font-size: 14px; line-height: 16px; color: var(--quiet); }
.forum-counters { display: flex; gap: 4px; flex: none; }
.forum-counters > span { display: grid; place-content: center; text-align: center; height: 46px; width: 92px; border-radius: 10px; background: var(--surface); color: var(--quiet); font-size: 12px; }
.forum-block--featured .forum-counters > span:first-child { width: 49px; }
.forum-counters strong { display: block; font-size: 16px; line-height: 19px; color: var(--text); }
.collapse-button { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; }
.collapse-button:hover { background: var(--hover); }
.collapse-button[aria-expanded="false"] img { transform: rotate(-90deg); }
.topic-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(132px, 190px) minmax(0, 340px); align-items: center; gap: 14px; min-height: 75px; padding: 12px 16px; border-top: 1px solid rgb(255 255 255 / 4%); }
.topic-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgb(255 255 255 / 4%); }
.topic-row--featured .topic-icon { width: 32px; height: 32px; }
.topic-icon--pin { background: rgb(212 174 98 / 12%); }
.topic-icon--flame { background: rgb(255 179 107 / 10%); }
.topic-description { min-width: 0; }
.topic-title { text-align: left; display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-title:hover, .forum-more:hover { text-decoration: underline; text-underline-offset: 2px; }
.topic-meta { display: flex; gap: 6px; align-items: center; margin-top: 2px; font-size: 14px; line-height: 16px; color: var(--quiet); }
.topic-stats { display: flex; justify-content: flex-end; gap: 16px; color: var(--quiet); font-size: 14px; }
.topic-stats span { text-align: right; }
.topic-stats strong { display: block; color: var(--bright); }
.last-message { display: flex; align-items: center; min-width: 0; gap: 10px; background: rgb(255 255 255 / 3%); padding: 8px 12px 8px 8px; border-radius: 18px; text-align: left; }
.last-message:hover { background: var(--hover); }
.message-copy { display: grid; flex: 1; min-width: 0; gap: 2px; }
.message-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--quiet); white-space: nowrap; }
.message-meta .person-name { font-weight: 600; }
.forum-more { display: flex; width: 100%; min-height: 36px; align-items: center; justify-content: center; gap: 10px; background: rgb(0 0 0 / 24%); color: var(--bright); font-size: 14px; }
.forum-block--featured .forum-more { background: transparent; }
[data-theme="light"] .last-message, [data-theme="light"] .forum-more, [data-theme="light"] .topic-row { background: var(--surface); }
.activity-list { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.empty { color: var(--muted); padding: 16px; }

dialog { width: min(640px, calc(100% - 24px)); max-height: min(84vh, 850px); border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--text); padding: 24px; overflow: auto; }
dialog::backdrop { background: rgb(0 0 0 / 72%); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.dialog-head h2 { font-size: 22px; line-height: 1.25; }
.close-button { display: grid; place-items: center; flex: none; width: 34px; height: 34px; font-size: 24px; background: var(--surface); border-radius: 50%; }
.dialog-body { display: grid; gap: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.dialog-body > p { color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dialog-action { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 13px; border-radius: 9px; color: var(--text); background: var(--surface); text-decoration: none; }
.dialog-action:hover { background: var(--hover); }
.dialog-action.primary { background: #e8c77f; color: #231a0b; font-weight: 600; }
.dialog-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.dialog-list button { width: 100%; text-align: left; }
.reply { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface); }
.reply small { color: var(--quiet); margin-left: 8px; }
.reply-form { display: grid; gap: 8px; }
.reply-form textarea { width: 100%; min-height: 96px; resize: vertical; padding: 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.status { color: var(--muted); font-size: 14px; }
@media (max-width: 1560px) {
  .header-nav { gap: 4px; }
  .nav-link { padding: 0 9px; }
  .layout { grid-template-columns: minmax(0, 1fr) clamp(220px, 17vw, 320px); }
  .topic-row { grid-template-columns: auto minmax(0, 1fr) minmax(125px, 15%) minmax(200px, 26%); }
}
@media (max-width: 1300px) {
  .masthead { grid-template-columns: minmax(125px, 17%) repeat(2, minmax(0, 1fr)); }
  .header-bar { flex-wrap: wrap; }
  .header-actions { margin-left: auto; }
  .news-head { flex-wrap: wrap; }
  .forum-tabs button { padding: 0 11px; }
}
@media (max-width: 1100px) {
  .shell { width: calc(100% - 32px); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .feed { display: contents; }
  .feed > :first-child { grid-row: 1; }
  .rfor-placement-rail { grid-row: 2; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forums-panel { grid-row: 3; }
  .rfor-placement-rail .rfor-placement { height: 170px; }
  .header-bar { gap: 8px; }
  .header-nav { overflow-x: auto; scrollbar-width: thin; }
  .header-nav, .header-actions { flex: 1 0 100%; }
  .search { flex: 1; width: auto; min-width: 120px; }
}
@media (max-width: 840px) {
  .forums-head { flex-wrap: wrap; gap: 10px; }
  .topic-row { grid-template-columns: auto minmax(0, 1fr) minmax(135px, 33%); }
  .topic-stats { display: none; }
}
@media (max-width: 570px) {
  .shell { width: calc(100% - 20px); margin-bottom: 24px; }
  .masthead { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .logo-slot { display: none; }
  .rfor-placement--top { height: 64px; font-size: 12px; }
  .rfor-placement--top .rfor-placement-size { font-size: 11px; }
  .header-bar { padding: 8px; }
  .header-actions { flex-wrap: wrap; gap: 6px; }
  .search { flex: 1 0 100%; }
  .toolbar-button { padding-inline: 8px; }
  .account-button { padding-left: 0; }
  .account-button img { width: 32px; height: 32px; }
  .account-button span:not(.balance) { display: none; }
  .account-button .balance { max-width: 58px; overflow: hidden; text-overflow: ellipsis; }
  .theme-switch button { width: 30px; }
  .search-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .layout, [data-role="guest"] .layout { gap: 12px; margin-top: 12px; }
  .panel { padding: 12px; }
  .panel-head { margin-bottom: 12px; }
  .news-grid { gap: 8px; }
  .news-card { padding: 12px; grid-template-rows: 24px auto 20px 22px; }
  .news-title { white-space: normal; }
  .forum-block { border-radius: 16px; }
  .forum-header { gap: 8px; padding: 10px; }
  .forum-icon { width: 36px; height: 36px; }
  .forum-name h3 { font-size: 16px; line-height: 19px; }
  .forum-name p { line-height: 15px; font-size: 12px; }
  .forum-counters { display: none; }
  .topic-row { grid-template-columns: auto minmax(0, 1fr); gap: 6px 8px; padding: 10px; }
  .topic-title { white-space: normal; }
  .topic-meta { flex-wrap: wrap; font-size: 12px; }
  .last-message { grid-column: 2; padding: 6px 8px 6px 6px; }
  .rfor-placement-rail { gap: 8px; }
  .rfor-placement-rail .rfor-placement { height: 115px; font-size: 14px; }
}

@media (max-width: 350px) {
  .pinned span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
}

@container (max-width: 878px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 581px) {
  .news-grid { grid-template-columns: minmax(0, 1fr); }
}
