/* Themes (same palettes as X): data-theme = black | dim | light, set by app.js
   ("Systemowy" picks black or light from the computer/phone setting). */
:root, :root[data-theme="black"] {
  --bg: #000;
  --line: #2f3336;
  --text: #e7e9ea;
  --muted: #71767b;
  --hover: rgba(231, 233, 234, .03);
  --hover-2: rgba(231, 233, 234, .1);
  --glass: rgba(0, 0, 0, .65);
  --glass-strong: rgba(0, 0, 0, .85);
  --field: #202327;
  --surface: #16181c;
  --switch-off: #333639;
  --btn-border: #536471;
  --on-text: #000;
  --primary-hover: #d7dbdc;
  --overlay: rgba(0, 0, 0, .45);
  --backdrop: rgba(91, 112, 131, .4);
  --shadow: rgba(255, 255, 255, .06);
  color-scheme: dark;
}
:root[data-theme="dim"] {
  --bg: #15202b;
  --line: #38444d;
  --text: #f7f9f9;
  --muted: #8b98a5;
  --hover: rgba(247, 249, 249, .03);
  --hover-2: rgba(247, 249, 249, .1);
  --glass: rgba(21, 32, 43, .7);
  --glass-strong: rgba(21, 32, 43, .88);
  --field: #273340;
  --surface: #1e2732;
  --switch-off: #38444d;
  --btn-border: #536471;
  --on-text: #0f1419;
  --primary-hover: #d7dbdc;
  --overlay: rgba(21, 32, 43, .5);
  --backdrop: rgba(91, 112, 131, .4);
  --shadow: rgba(255, 255, 255, .06);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fff;
  --line: #eff3f4;
  --text: #0f1419;
  --muted: #536471;
  --hover: rgba(15, 20, 25, .03);
  --hover-2: rgba(15, 20, 25, .1);
  --glass: rgba(255, 255, 255, .85);
  --glass-strong: rgba(255, 255, 255, .92);
  --field: #eff3f4;
  --surface: #f7f9f9;
  --switch-off: #cfd9de;
  --btn-border: #cfd9de;
  --on-text: #fff;
  --primary-hover: #272c30;
  --overlay: rgba(255, 255, 255, .5);
  --backdrop: rgba(0, 0, 0, .4);
  --shadow: rgba(101, 119, 134, .2);
  color-scheme: light;
}
:root {
  --accent: #1d9bf0;
  --up: #00ba7c;
  --down: #f4212e;
  --warm: #ffad1f;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 20px; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
svg { display: block; }

/* ------------------------------------------------------------------ layout */
.app { display: flex; justify-content: center; min-height: 100vh; }
.left { width: 275px; flex: 0 0 auto; display: flex; justify-content: flex-end; }
.left-inner { position: sticky; top: 0; height: 100vh; width: 259px; padding: 0 8px; display: flex; flex-direction: column; }
.center { width: 600px; flex: 0 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; }
.right { width: 350px; flex: 0 0 auto; margin-left: 30px; padding: 0 0 40px; }

/* ------------------------------------------------------------------ left nav */
.brand { display: grid; place-items: center; width: 52px; height: 52px; margin: 2px 0 2px; border-radius: 50%; transition: background .2s; }
.brand:hover { background: var(--hover-2); }
.brand svg, .mobile-logo { width: 30px; height: 30px; color: var(--text); }
.nav { list-style: none; margin: 4px 0 0; padding: 0; }
.nav li { display: block; }
.nav button { display: inline-flex; align-items: center; gap: 20px; padding: 12px 24px 12px 12px; border-radius: 999px; font-size: 20px; line-height: 24px; transition: background .2s; }
.nav button:hover { background: var(--hover-2); }
.nav button.active { font-weight: 700; }
.nav .ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav button.active .ico svg { stroke-width: 2.6; }
.nav .badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; margin-left: -10px; }

/* ------------------------------------------------------------------ center header */
.top { position: sticky; top: 0; z-index: 20; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.mobile-bar { display: none; height: 53px; align-items: center; justify-content: center; position: relative; }
.mobile-bar .icon-btn { position: absolute; right: 8px; top: 8px; }
.tabs { display: flex; height: 53px; }
.tab { flex: 1; display: flex; justify-content: center; color: var(--muted); font-weight: 500; transition: background .2s; }
.tab:hover { background: var(--hover-2); }
.tab span { position: relative; display: flex; align-items: center; height: 100%; }
.tab.active { color: var(--text); font-weight: 700; }
.tab.active span::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 2px; background: var(--accent); }
/* topic filter: a button at the end of the tabs, topics in a menu (X style) */
.tab-filter { position: relative; flex: 0 0 53px; display: grid; place-items: center; color: var(--text); transition: background .2s; }
.tab-filter:hover { background: var(--hover-2); }
.tab-filter svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.tab-filter.active { color: var(--accent); }
.tab-filter.active::after { content: ""; position: absolute; top: 14px; right: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.topic-menu { position: absolute; right: 10px; top: 46px; z-index: 40; width: 260px; padding: 4px 0; border-radius: 12px; background: var(--bg);
              box-shadow: 0 0 15px var(--shadow), 0 0 3px 1px var(--shadow); }
.topic-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 16px; font-weight: 700; text-align: left; transition: background .2s; }
.topic-menu button:hover { background: var(--hover); }
.topic-menu small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; line-height: 16px; }
.topic-menu svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }


/* ------------------------------------------------------------------ accounts */
.account { margin-top: auto; padding: 12px 0; width: 100%; }
.acct-guest { display: grid; gap: 10px; padding: 0 4px; }
.acct-guest .btn { height: 40px; font-size: 15px; width: 100%; }
.acct-guest .acct-icon { display: none; width: 52px; height: 52px; place-items: center; margin: 0 auto; }
.acct-icon svg, .mobile-account svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.acct-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 999px; text-align: left; transition: background .2s; }
.acct-btn:hover { background: var(--hover-2); }
.acct-btn .who { min-width: 0; flex: 1; line-height: 18px; }
.acct-btn .who b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn .who small { display: block; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn .dots { color: var(--text); font-weight: 700; letter-spacing: 1px; }
.uav { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; }
.uav img { width: 100%; height: 100%; object-fit: cover; }
.acct-menu { position: fixed; z-index: 95; min-width: 260px; padding: 12px 0; border-radius: 16px; background: var(--bg); box-shadow: 0 0 15px var(--shadow), 0 0 3px 1px var(--shadow); }
.acct-menu button { display: block; width: 100%; padding: 12px 16px; text-align: left; font-weight: 700; font-size: 15px; transition: background .2s; }
.acct-menu button:hover { background: var(--hover); }
.mobile-account { position: absolute; left: 12px; top: 10px; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.mobile-account .uav { width: 32px; height: 32px; font-size: 13px; }
.mobile-account svg { width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; }

/* forms (X-style floating labels) */
.field { position: relative; margin: 0 16px 14px; }
.field input, .field textarea { width: 100%; padding: 24px 10px 8px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--text); font: inherit; font-size: 17px; outline: 0; transition: border-color .15s; resize: vertical; }
.field label { position: absolute; left: 11px; top: 17px; color: var(--muted); font-size: 17px; pointer-events: none; transition: all .15s; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field input:focus + label, .field textarea:focus + label { color: var(--accent); }
.field input:not(:placeholder-shown) + label, .field input:focus + label,
.field textarea:not(:placeholder-shown) + label, .field textarea:focus + label { top: 7px; font-size: 13px; }
.field.bad input, .field.bad textarea { border-color: var(--down); box-shadow: 0 0 0 1px var(--down); }
.field .err { display: block; color: var(--down); font-size: 13px; margin-top: 4px; min-height: 0; }
.field .err:empty { display: none; }
.field .hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
/* username field: fixed "@" in front of the text */
.field.at input { padding-left: 26px; }
.field.at .at-sign { position: absolute; left: 11px; top: 24px; font-size: 17px; line-height: 22px; color: var(--muted); pointer-events: none; opacity: 0; transition: opacity .15s; }
.field.at input:focus ~ .at-sign, .field.at input:not(:placeholder-shown) ~ .at-sign { opacity: 1; }
.field .counter { position: absolute; right: 10px; top: 7px; color: var(--muted); font-size: 13px; }
.form-error { margin: 0 16px 14px; padding: 10px 12px; border-radius: 8px; background: rgba(244, 33, 46, .1); color: var(--down); font-size: 14px; }
.btn.wide { display: block; width: calc(100% - 32px); margin: 8px 16px 0; height: 48px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: default; }

.modal.auth { width: 480px; }
.auth-logo { width: 30px; height: 30px; margin: 0 auto; fill: none; stroke: var(--text); stroke-width: 4; stroke-linecap: square; transform: translateX(-18px); }
.auth-body { padding: 8px 16px 32px; }
.auth-body h3 { margin: 16px 16px 24px; font-size: 31px; line-height: 36px; font-weight: 800; }
.auth-switch { margin: 24px 16px 0; color: var(--muted); font-size: 15px; }
.auth-switch button { color: var(--accent); font-weight: 600; }
.auth-switch button:hover { text-decoration: underline; }
.auth .reg-only { display: none; }
.auth.register .reg-only { display: block; }

.head-save { margin-left: auto; height: 32px; padding: 0 16px; font-size: 14px; }
.profile-body { padding-top: 12px; }
.avatar-edit { position: relative; width: 112px; height: 112px; margin: 4px 16px 20px; }
.avatar-big { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 40px; font-weight: 800; border: 4px solid var(--bg); }
.avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.avatar-change { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 20, 25, .75); cursor: pointer; transition: background .2s; }
.avatar-change:hover { background: rgba(39, 44, 48, .75); }
.avatar-change svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.group-title.small { font-size: 17px; padding-top: 8px; }
.style-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.style-chips button { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; transition: all .15s; }
.style-chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pw-row { padding: 0 16px 8px; }

/* theme picker (settings) */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 4px 16px 8px; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.theme-opt:hover { background: var(--hover); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:checked) { border: 2px solid var(--accent); padding: 9px 7px; }
.theme-opt b { font-size: 13px; font-weight: 700; }
.theme-opt small { font-size: 11px; color: var(--muted); line-height: 13px; }
.sw { width: 100%; height: 34px; border-radius: 8px; border: 1px solid var(--line); }
.sw-light { background: #fff; }
.sw-dim { background: #15202b; }
.sw-black { background: #000; }
.sw-system { background: linear-gradient(135deg, #fff 50%, #000 50%); }
@media (max-width: 520px) { .themes { grid-template-columns: repeat(2, 1fr); } }

/* "Rynki" card group labels */
.mk-group { padding: 10px 16px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mk-live { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--up); margin-right: 6px; vertical-align: 1px; }
.setting .sound-note { color: var(--accent); margin-top: 4px; }
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.filterbar b { color: var(--text); }
.filterbar small { margin-left: 4px; }
.filterbar button { color: var(--accent); font-weight: 600; }
.filterbar button:hover { text-decoration: underline; }
/* "Na czasie": stories like X's "what's happening", with the price move since each story */
.trend { display: block; width: 100%; padding: 12px 16px; text-align: left; transition: background .2s; }
.trend:hover { background: var(--hover); }
.trend small { display: block; color: var(--muted); font-size: 13px; line-height: 16px; }
.trend b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 4px; font-size: 15px; line-height: 20px; font-weight: 700; }
.trend .moves { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; line-height: 16px; color: var(--muted); }
.trend .moves em { font-style: normal; font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.trend .moves .up { color: var(--up); }
.trend .moves .down { color: var(--down); }
.trend-more { display: block; width: 100%; padding: 16px; text-align: left; color: var(--accent); font-size: 15px; transition: background .2s; }
.trend-more:hover { background: var(--hover); }
.notice { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.notice b { color: var(--text); font-weight: 600; }

.new-pill { position: sticky; top: 66px; z-index: 25; display: block; margin: 12px auto -48px; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 0 15px rgba(29, 155, 240, .35); }

/* ------------------------------------------------------------------ posts */
.post { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background .2s; }
.post:hover { background: var(--hover); }
.post.enter { animation: enter .5s ease-out; }
.post.flash { animation: flash 3s ease-out; }
.av { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); overflow: hidden; display: grid; place-items: center; margin-right: 4px; }
.av img { width: 26px; height: 26px; object-fit: contain; }
.av.fallback { background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; }
.av.markt { background: var(--bg); border: 1px solid var(--line); }
.av.markt svg { width: 22px; height: 22px; color: var(--text); }
.body { flex: 1; min-width: 0; }
.meta { display: flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; min-width: 0; }
.meta .name { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.meta .official { width: 17px; height: 17px; flex: 0 0 auto; margin-left: -2px; }
.meta .official circle { fill: #829aab; }
.meta .official path { fill: none; stroke: var(--on-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.meta .handle { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.meta .time { flex: 0 0 auto; }
.meta .time:hover { text-decoration: underline; cursor: default; }
.strength { margin-left: auto; padding-left: 8px; flex: 0 0 auto; display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.strength i { width: 3px; border-radius: 1px; background: var(--line); }
.strength i:nth-child(1) { height: 5px; } .strength i:nth-child(2) { height: 8px; } .strength i:nth-child(3) { height: 11px; } .strength i:nth-child(4) { height: 14px; }
.strength.s-hot i.on { background: var(--down); }
.strength.s-warm i.on { background: var(--warm); }
.strength.s-mid i.on { background: var(--muted); }
.text { margin-top: 2px; white-space: pre-wrap; word-wrap: break-word; }
.text.strong { font-weight: 600; }
.original { margin-top: 4px; color: var(--muted); font-size: 14px; }
.toggle-orig { margin-top: 4px; color: var(--accent); font-size: 14px; }
.toggle-orig:hover { text-decoration: underline; }
.desc { margin-top: 4px; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.analysis { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.analysis .label { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.analysis p { margin: 0; font-size: 15px; }
.pending { margin-top: 12px; display: grid; gap: 8px; }
.pending span { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--hover-2) 0%, var(--line) 50%, var(--hover-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.pending span:last-child { width: 62%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.admin-only { display: none; }
body.is-admin .admin-only { display: block; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.media { margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.media img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.assets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.asset { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; transition: background .2s; }
.asset:hover { background: var(--hover-2); }
.asset .arr { width: 12px; height: 12px; }
.asset .arr path { fill: currentColor; }
.asset.up .arr { color: var(--up); }
.asset.down .arr { color: var(--down); }
.asset.volatile .arr { color: var(--warm); }
.asset .move { font-weight: 500; color: var(--muted); }
.asset .move.up { color: var(--up); }
.asset .move.down { color: var(--down); }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.foot .sep::before { content: "·"; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }
.foot .slow { color: var(--warm); }
/* one event = lead card + "N sources" row (Najważniejsze tab) */
.event-group { border-bottom: 1px solid var(--line); }
.event-group > .post { border-bottom: 0; }
.event-more { padding: 0 16px 12px 68px; }
.ev-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; text-align: left; font-size: 13px; line-height: 17px; color: var(--muted); transition: background .2s; }
.ev-head:hover { background: var(--hover-2); }
.ev-label b { color: var(--text); font-weight: 600; }
.ev-toggle { flex: 0 0 auto; color: var(--accent); font-weight: 600; white-space: nowrap; }
.ev-list { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ev-row { display: block; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--text); }
.ev-row:first-child { border-top: 0; }
.ev-row:hover { background: var(--hover); text-decoration: none; }
.ev-meta { display: block; font-size: 12px; color: var(--muted); }
.ev-title { display: block; font-size: 14px; margin-top: 1px; }
.bsrc { margin-top: 8px; font-size: 12px; color: var(--muted); }
@media (max-width: 690px) { .event-more { padding-left: 62px; } }
.empty { padding: 40px 32px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 20px; line-height: 24px; font-weight: 800; margin-bottom: 8px; }
.empty .btn { display: flex; margin: 20px auto 0; height: 36px; padding: 0 16px; font-size: 15px; }
.feed-foot { padding: 20px 16px 60px; text-align: center; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------------ right column */
.search { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0 12px; }
.search > svg { position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.search input { width: 100%; height: 42px; padding: 0 16px 0 48px; border-radius: 999px; border: 1px solid transparent; background: var(--field); color: var(--text); font: inherit; outline: 0; }
.search input:focus { background: var(--bg); border-color: var(--accent); }
.search:focus-within > svg { stroke: var(--accent); }
.card { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 16px; overflow: hidden; }
.card h2 { margin: 0; padding: 12px 16px; font-size: 20px; line-height: 24px; font-weight: 800; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; transition: background .2s; }
.row:hover { background: var(--hover); }
.row .l { min-width: 0; }
.row .l small, .row .r small { display: block; color: var(--muted); font-size: 13px; line-height: 16px; }
.row .l b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r { text-align: right; flex: 0 0 auto; }
.row .r b { display: block; font-weight: 600; }
.row .up { color: var(--up); }
.row .down { color: var(--down); }
.row .soon { color: var(--accent); }
.row .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 2px; }
.dot.high { background: var(--down); }
.dot.medium { background: var(--warm); }
.dot.low { background: #536471; }
.row.past { opacity: .5; }
.card .empty-row { padding: 4px 16px 16px; color: var(--muted); font-size: 14px; }
.card h2 small#mktFresh { font-size: 11px; font-weight: 500; color: var(--muted); }
.cal-day { padding: 10px 16px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal-day:first-child { padding-top: 2px; }
.ccy { font-weight: 700; color: var(--text); }
.row .l small b.ccy { display: inline; }
.row.stale { opacity: .5; }
.row.stale .r small { color: var(--muted) !important; }

/* usage panel */
.usage { padding: 4px 16px 0; }
.ubars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ucell { border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.ucell b { font-size: 18px; }
.ucell small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ucap { margin-top: 10px; }
.ucap-bar { height: 6px; border-radius: 6px; background: var(--surface); overflow: hidden; }
.ucap-bar span { display: block; height: 100%; border-radius: 6px; transition: width .3s; }
.ucap small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.uhist { margin-top: 12px; border-top: 1px solid var(--line); }
.uhist .urow { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 6px 0; font-size: 13px; color: var(--muted);
               border-bottom: 1px solid var(--line); cursor: default; }
.uhist .urow:hover { background: none; }
.uhist .urow:last-child { border-bottom: 0; }
.uhist .urow .mono { color: var(--text); }
.btn.danger { border-color: rgba(244, 33, 46, .5); color: var(--down); }
.btn.danger:hover { background: rgba(244, 33, 46, .1); }
.spark { width: 56px; height: 20px; margin: 0 4px 0 auto; }
.legal { margin: 0; padding: 0 16px; color: var(--muted); font-size: 13px; line-height: 16px; }

/* ------------------------------------------------------------------ modal */
.backdrop { position: fixed; inset: 0; z-index: 100; background: var(--backdrop); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; }
.modal { width: 600px; max-width: 100%; max-height: 90vh; overflow-y: auto; background: var(--bg); border-radius: 16px; }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 24px; height: 53px; padding: 0 16px 0 8px; background: var(--glass-strong); backdrop-filter: blur(12px); }
.modal-head h3 { margin: 0; font-size: 20px; font-weight: 800; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.icon-btn:hover { background: var(--hover-2); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal-body { padding: 0 0 16px; }
.group-title { padding: 16px 16px 8px; font-size: 20px; line-height: 24px; font-weight: 800; }
.group-title small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 16px; cursor: pointer; transition: background .2s; }
.setting:hover { background: var(--hover); }
.setting.col { flex-direction: column; align-items: stretch; gap: 10px; cursor: default; }
.setting b { display: block; font-weight: 400; }
.setting small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 16px; }
.setting em { font-style: normal; color: var(--text); font-weight: 600; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.switch { appearance: none; flex: 0 0 auto; width: 40px; height: 24px; border-radius: 999px; background: var(--switch-off); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.btn { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--btn-border); font-weight: 700; font-size: 14px; transition: background .2s; flex: 0 0 auto; }
.btn:hover { background: var(--hover-2); }
.sources .row { padding: 8px 16px; }
.sources .row .l { display: flex; align-items: center; gap: 12px; }
.sources img { width: 20px; height: 20px; border-radius: 4px; background: #fff; padding: 2px; object-fit: contain; }
.sources .state { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.sources .state.ok { background: var(--up); }
.sources .state.err { background: var(--down); }
.muted-note { margin: 12px 16px 0; color: var(--muted); font-size: 13px; line-height: 16px; }

/* ------------------------------------------------------------------ morning briefing */
.brief-backdrop { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 4vh 16px; overflow-y: auto;
  background: var(--overlay); backdrop-filter: blur(10px) saturate(.7); -webkit-backdrop-filter: blur(10px) saturate(.7); animation: fadein .25s ease-out; }
.brief { width: 600px; max-width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 0 40px var(--shadow); margin-bottom: 4vh; }
.brief-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 10px 16px 10px 8px; border-bottom: 1px solid var(--line);
  border-radius: 16px 16px 0 0; background: var(--glass-strong); backdrop-filter: blur(12px); }
.brief-head h3 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 800; }
.brief-head small { display: block; color: var(--muted); font-size: 13px; line-height: 16px; margin-top: 2px; }
.brief-sec { padding: 16px 16px 8px; font-size: 17px; font-weight: 800; display: flex; align-items: baseline; gap: 8px; }
.brief-sec small { font-size: 13px; font-weight: 400; color: var(--muted); }
.brief-note { padding: 4px 16px 12px; color: var(--muted); font-size: 14px; }
.brief-progress { display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; color: var(--muted); font-size: 13px; }
.bitem { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.bitem:hover { background: var(--hover); }
.bitem .av { width: 36px; height: 36px; margin: 0; }
.bitem .av img { width: 22px; height: 22px; }
.bitem .body { min-width: 0; flex: 1; }
.bitem .bt { font-weight: 600; margin-top: 2px; }
.bitem .bw { color: var(--muted); font-size: 14px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bitem .assets { margin-top: 8px; gap: 6px; }
.bitem .asset { height: 26px; padding: 0 10px; font-size: 13px; cursor: default; }
.bmk { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.bmk .row { padding: 10px 16px; }
.bmk .row:nth-child(odd) { border-right: 1px solid var(--line); }
.bcal { border-top: 1px solid var(--line); }
.brief-foot { display: flex; justify-content: flex-end; padding: 14px 16px; border-top: 1px solid var(--line); }
.btn.primary { background: var(--text); color: var(--on-text); border-color: var(--text); height: 40px; padding: 0 22px; font-size: 15px; }
.btn.primary:hover { background: var(--primary-hover); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 690px) { .bmk { grid-template-columns: 1fr; } .bmk .row:nth-child(odd) { border-right: 0; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; padding: 12px 16px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 15px; box-shadow: 0 0 15px var(--shadow); }

/* ------------------------------------------------------------------ animations */
@keyframes enter { from { background: rgba(29, 155, 240, .08); } to { background: transparent; } }
@keyframes flash { from { background: rgba(29, 155, 240, .16); } to { background: transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ Społeczność (stage C1) */
.c-head { display: flex; align-items: center; gap: 16px; min-height: 53px; padding: 0 16px; }
.c-head .c-back { margin-left: -8px; }
.c-head .icon-btn svg { width: 20px; height: 20px; stroke-width: 2; }
.c-title { min-width: 0; }
.c-title h2 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-title small { display: block; color: var(--muted); font-size: 13px; line-height: 16px; }

.composer { display: flex; gap: 12px; padding: 12px 16px 8px; border-bottom: 1px solid var(--line); }
.composer .cbody { flex: 1; min-width: 0; }
.composer textarea { display: block; width: 100%; min-height: 48px; max-height: 60vh; padding: 10px 0; border: 0; outline: 0; resize: none; overflow-y: auto;
                     background: transparent; color: var(--text); font: inherit; font-size: 20px; line-height: 26px; }
.composer.reply textarea { font-size: 17px; line-height: 22px; min-height: 42px; }
.composer textarea::placeholder { color: var(--muted); }
.composer .tools { display: flex; align-items: center; gap: 2px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.composer .ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); transition: background .2s; }
.composer .ic:hover { background: rgba(29, 155, 240, .1); }
.composer .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer .count { margin-left: auto; margin-right: 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.composer .count.over { color: var(--down); font-weight: 700; }
.composer .send { margin-left: auto; height: 36px; font-size: 15px; }
.composer .count:not(:empty) + .send { margin-left: 0; }
.composer.guest { display: block; padding: 16px; }
.composer.guest p { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.composer.guest div { display: flex; gap: 10px; }
.cimgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 8px; }
.cimgs:empty { display: none; }
.cimg { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface); }
.cimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cimg button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 20, 25, .75); color: #fff; }
.cimg button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.upost { cursor: pointer; }
.upost .c-author { flex: 0 0 auto; height: 40px; margin-right: 4px; }
.uv-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; }
.uv-av img { width: 100%; height: 100%; object-fit: cover; }
.upost .meta .name { color: var(--text); }
.upost .meta .more { margin: -6px -8px -6px auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: background .2s, color .2s; }
.upost .meta .more:hover { background: rgba(29, 155, 240, .1); color: var(--accent); }
.upost .meta .more svg { width: 18px; height: 18px; fill: currentColor; }
.upost .text a { color: var(--accent); word-break: break-all; }
.upost .text a.ct { word-break: normal; }
.upost .text.gone { color: var(--muted); }
.upost.main { cursor: default; }
.upost.main:hover { background: transparent; }
.upost.main .text { font-size: 17px; line-height: 24px; margin-top: 6px; }
.upost.main .stamp { margin-top: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.pimgs { display: grid; gap: 2px; margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pimgs button { display: block; min-height: 0; min-width: 0; cursor: zoom-in; }
.pimgs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pimgs.n1 img { height: auto; max-height: 510px; }
.pimgs.n2, .pimgs.n3, .pimgs.n4 { grid-template-columns: 1fr 1fr; height: 286px; }
.pimgs.n3, .pimgs.n4 { grid-template-rows: 1fr 1fr; }
.pimgs.n3 button:first-child { grid-row: span 2; }
.acts { display: flex; justify-content: space-between; max-width: 425px; margin: 8px 0 -6px -8px; }
.acts button { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px; border-radius: 999px; color: var(--muted); font-size: 13px; transition: color .2s, background .2s; }
.acts button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acts [data-act="reply"]:hover, .acts [data-act="share"]:hover,
.acts [data-nact]:hover { color: var(--accent); background: rgba(29, 155, 240, .1); }
.news-acts { max-width: none; justify-content: flex-start; gap: 48px; margin-top: 6px; }
.post.main:hover { background: transparent; }
.c-none { padding: 24px 16px; color: var(--muted); text-align: center; font-size: 15px; }
.acts [data-act="like"]:hover { color: #f91880; background: rgba(249, 24, 128, .1); }
.acts .liked { color: #f91880; }
.acts .liked svg { fill: #f91880; stroke: #f91880; }
.c-parent { display: block; padding: 12px 16px 0; font-size: 14px; }
.c-menu { position: fixed; z-index: 60; min-width: 220px; padding: 4px 0; border-radius: 12px; background: var(--bg); box-shadow: 0 0 15px var(--shadow), 0 0 3px 1px var(--shadow); }
.c-menu button { display: block; width: 100%; padding: 12px 16px; text-align: left; font-weight: 700; color: var(--down); }
.c-menu button:hover { background: var(--hover); }
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(0, 0, 0, .9); cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; object-fit: contain; }
#cFoot .spinner { margin: 0 auto; }
.empty .btn[data-go] { display: flex; margin: 20px auto 0; }
.tabbar { display: none; }

/* ------------------------------------------------------------------ profiles, follows, notifications (stage C3) */
.c-head { display: block; min-height: 0; padding: 0; }
.c-row { display: flex; align-items: center; gap: 16px; min-height: 53px; padding: 0 16px; }
.c-tabs { border-top: 0; }
.ptabs { border-bottom: 1px solid var(--line); }
.prof { padding: 12px 16px 14px; }
.prof-top { display: flex; align-items: flex-start; gap: 16px; }
.uv-av.big { width: 72px; height: 72px; font-size: 24px; flex: 0 0 auto; }
.prof-top .who { flex: 1; min-width: 0; padding-top: 8px; }
.prof-top .btn { margin-top: 10px; }
.pname { font-size: 20px; line-height: 24px; font-weight: 800; overflow-wrap: anywhere; }
.phandle { color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fy { white-space: nowrap; padding: 1px 6px; border-radius: 4px; background: var(--hover-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.pbio { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pbio a { color: var(--accent); }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pchips span { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.plbl { margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pquotes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.quote { display: inline-flex; gap: 8px; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
         font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; transition: background .2s; }
.quote:hover { background: var(--hover-2); text-decoration: none; }
.quote small { font-weight: 600; }
.quote .up { color: var(--up); } .quote .down { color: var(--down); }
.pmeta { margin-top: 12px; color: var(--muted); font-size: 15px; }
.pstats { display: flex; gap: 20px; margin-top: 8px; font-size: 15px; }
.pstats a { color: var(--muted); }
.pstats b { color: var(--text); font-weight: 700; }
.btn.follow { background: var(--text); border-color: var(--text); color: var(--on-text); min-width: 104px; }
.btn.follow:hover { background: var(--primary-hover); }
.btn.follow.on { background: transparent; color: var(--text); border-color: var(--btn-border); min-width: 150px; }
.btn.follow .f-off { display: none; }
.btn.follow.on:hover { color: var(--down); border-color: rgba(244, 33, 46, .5); background: rgba(244, 33, 46, .1); }
.btn.follow.on:hover .f-on { display: none; }
.btn.follow.on:hover .f-off { display: inline; }
.urow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; cursor: pointer; transition: background .2s; }
.urow:hover { background: var(--hover); }
.urow .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.urow .name { color: var(--text); font-weight: 700; }
.urow .handle { color: var(--muted); }
.urow p { margin: 4px 0 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.notif:hover { background: var(--hover); }
.notif .ic { width: 40px; flex: 0 0 auto; display: flex; justify-content: flex-end; }
.notif .ic svg { width: 28px; height: 28px; }
.notif .ic.like svg { fill: #f91880; }
.notif .ic.follow svg { fill: var(--accent); }
.notif .b { flex: 1; min-width: 0; }
.notif .avs { display: flex; gap: 4px; margin-bottom: 8px; }
.notif .avs .uv-av { width: 32px; height: 32px; font-size: 12px; }
.notif .t a { color: var(--text); }
.notif .t .when { color: var(--muted); }
.notif .snip { margin-top: 6px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.notif.unread, .upost.unread { background: rgba(29, 155, 240, .06); }
.upost .rto { color: var(--muted); font-size: 14px; }
.nav .ico { position: relative; }
.nav .ico .badge { position: absolute; top: -6px; left: 14px; margin: 0; }
.tabbar button { position: relative; }
.tabbar .badge { position: absolute; top: 6px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
                 background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* ------------------------------------------------------------------ moderation (stage C4) */
.c-menu button { display: flex; align-items: center; gap: 12px; color: var(--text); }
.c-menu button.red { color: var(--down); }
.c-menu button svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.prof-top .pmore { margin-top: 10px; border: 1px solid var(--btn-border); }
.prof-top .pmore svg { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.member-only { display: none; }
body.is-member .member-only { display: block; }
.privacy { padding: 0 0 4px; }
.privacy .muted-note { margin: 0 16px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.prow .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prow .who small { color: var(--muted); font-size: 14px; }
.modal.report { width: 520px; }
.modal.report .lead { margin: 4px 16px 8px; color: var(--muted); }
.reason { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; cursor: pointer; transition: background .2s; }
.reason:hover { background: var(--hover); }
.reason input { position: absolute; opacity: 0; pointer-events: none; }
.reason .r { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--muted); margin-top: 2px; transition: border .15s; }
.reason input:checked + .r { border: 6px solid var(--accent); }
.reason input:focus-visible + .r { box-shadow: 0 0 0 3px rgba(29, 155, 240, .35); }
.reason b { display: block; }
.reason small { display: block; color: var(--muted); font-size: 14px; line-height: 18px; }
#reportNote { display: block; width: calc(100% - 32px); margin: 8px 16px 0; min-height: 72px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
              background: transparent; color: var(--text); font: inherit; resize: vertical; }
#reportNote:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.modal.report .btn.wide { margin-top: 16px; }
.case { border-bottom: 1px solid var(--line); }
.case .flag { margin: 12px 16px 0; padding: 8px 12px; border-radius: 8px; background: rgba(244, 33, 46, .1); color: var(--down); font-size: 14px; font-weight: 600; }
.case .flag.soft { background: var(--hover-2); color: var(--muted); }
.case .mod-card { border-bottom: 0; cursor: default; }
.case .mod-card .text { font-size: 15px; line-height: 20px; }
.case .why { margin: 0 16px 0 68px; font-size: 14px; color: var(--muted); }
.case .why b { color: var(--text); }
.case .why q { display: block; margin-top: 4px; font-style: italic; quotes: "„" "”"; }
.case .mods { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 14px 68px; }
.case .mods .btn { height: 32px; font-size: 14px; }
.btn.dangerf { background: var(--down); border-color: var(--down); color: #fff; }
.btn.dangerf:hover { background: #d81b27; }
.mod-words { padding: 12px 16px 20px; }
.mod-words p { margin: 0 0 12px; color: var(--muted); }
.mod-words textarea { display: block; width: 100%; min-height: 260px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent;
                      color: var(--text); font: 14px/20px ui-monospace, "Cascadia Mono", Consolas, monospace; resize: vertical; }
.mod-words .btn { margin-top: 12px; }
.logrow { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.logrow .when { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.logrow b { font-weight: 700; }

/* ------------------------------------------------------------------ stage D: reposts, cashtag pages, search, admin */
.qnews { display: block; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); transition: background .2s; }
a.qnews:hover { background: var(--hover); text-decoration: none; }
.qnews .qm { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.qnews .qm img { width: 18px; height: 18px; border-radius: 50%; background: #fff; object-fit: contain; }
.qnews .qm b { color: var(--text); }
.qnews .strength { margin-left: auto; }
.qnews .qt { display: block; margin-top: 4px; font-weight: 600; }
.qnews .qa { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qnews .asset { height: 26px; padding: 0 10px; font-size: 13px; }
.cquote { margin: 0 0 8px; }
.modal.repost { width: 600px; }
.modal.repost .composer { border-bottom: 0; }
.news-acts [data-nact="repost"]:hover { color: var(--up); background: rgba(0, 186, 124, .1); }
.news-acts [data-nact="repost"] span { font-size: 13px; }
.tag-top { padding: 14px 16px 16px; }
.tag-px { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tag-px .px { font-size: 32px; line-height: 38px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tag-px .ch { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tag-px .ch.up { color: var(--up); } .tag-px .ch.down { color: var(--down); }
.tag-px .sub { color: var(--muted); font-size: 14px; }
.tag-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.tag-meta b { color: var(--text); }
.sbox { flex: 1; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--field); border: 1px solid transparent; }
.sbox:focus-within { border-color: var(--accent); background: var(--bg); }
.sbox svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.sbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.sec2 { padding: 14px 16px 6px; font-size: 20px; font-weight: 800; }
.nrow { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.nrow:hover { background: var(--hover); }
.nrow img { width: 22px; height: 22px; border-radius: 50%; background: #fff; object-fit: contain; flex: 0 0 auto; margin-top: 2px; }
.nrow .t { font-weight: 600; }
.nrow small { display: block; color: var(--muted); font-size: 13px; }
mark { background: rgba(29, 155, 240, .25); color: inherit; border-radius: 3px; padding: 0 1px; }
.more2 { display: block; width: 100%; padding: 12px 16px; text-align: left; color: var(--accent); border-bottom: 1px solid var(--line); transition: background .2s; }
.more2:hover { background: var(--hover); }
.nav li.narrow-only { display: none; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px; }
.tile { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.tile[data-go] { cursor: pointer; transition: background .2s; }
.tile[data-go]:hover { background: var(--hover); }
.tile small { display: block; color: var(--muted); font-size: 13px; }
.tile b { display: block; margin-top: 4px; font-size: 26px; line-height: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .d { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.adm-status { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.adm-status svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.adm-status.ok svg { color: var(--up); } .adm-status.warn svg { color: var(--warm); }
.adm-status span { color: var(--muted); }
.adm-sec { padding: 16px 16px 8px; border-top: 1px solid var(--line); font-size: 17px; font-weight: 800; }
.adm-sec small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.adm-sources, .adm-usage { padding: 0 0 8px; }
.adm-usage { padding: 0 16px 16px; }
.adm-note { margin: 8px 16px 16px; }
.adm-filter { display: flex; padding: 12px 16px; }
.adm-user { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.adm-user .who { flex: 1; min-width: 0; }
.adm-user .who b { display: block; }
.adm-user .who b a { color: var(--text); }
.adm-user .who small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-user .acts3 { display: flex; gap: 6px; flex: 0 0 auto; }
.adm-user .btn { height: 30px; padding: 0 12px; font-size: 13px; }
@media (max-width: 1020px) { .nav li.narrow-only { display: block; } }
@media (max-width: 690px) { .tiles { grid-template-columns: repeat(2, 1fr); } .adm-user { flex-wrap: wrap; } .adm-user .acts3 { width: 100%; padding-left: 52px; } }

/* ------------------------------------------------------------------ credibility pill (version B) */
.meta .cred-pill { flex: 0 0 auto; margin-left: 2px; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 700; line-height: 18px; cursor: default; }
.cred-pill.ok { color: var(--up); background: rgba(0, 186, 124, .12); }
.cred-pill.warn { color: var(--warm); background: rgba(255, 173, 31, .14); }
.cred-pill.info { color: var(--accent); background: rgba(29, 155, 240, .12); }
.cred-pill.muted { color: var(--muted); background: var(--hover-2); }

/* ------------------------------------------------------------------ closed beta: login wall + profile steps */
body.walled { overflow: hidden; }
body.walled .app, body.walled .tabbar { display: none; }
.wall { position: fixed; inset: 0; z-index: 100; overflow-y: auto; }
.wall-bg { position: fixed; inset: 0; background: #15202b url("/img/wall-bg.jpg") center / cover no-repeat; }
.wall-bg::after { content: ""; position: absolute; inset: 0; background: rgba(10, 16, 22, .45); }
.wall-wrap { position: relative; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 32px 16px; box-sizing: border-box; }
.wall-card { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); color: var(--text); }
.wall .field { margin: 0 0 14px; }
.wall .btn.wide { width: 100%; margin: 6px 0 0; height: 44px; }
.wall-auth { width: 860px; max-width: 100%; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.wall-left { padding: 40px 36px; background: linear-gradient(160deg, rgba(29, 155, 240, .16), rgba(29, 155, 240, 0) 60%); border-right: 1px solid var(--line); }
.wall-mark svg { width: 36px; height: 36px; color: var(--text); }
.wall-left h1 { font-size: 30px; line-height: 36px; margin: 22px 0; font-weight: 800; }
.wall-feat { display: flex; gap: 12px; margin-bottom: 18px; }
.wall-feat svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.wall-feat b { display: block; font-size: 15px; }
.wall-feat span { color: var(--muted); font-size: 14px; line-height: 19px; }
.wall-beta { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; padding: 3px 10px; border-radius: 999px; background: var(--hover-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.wall-beta i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.wall-right { padding: 28px 32px 30px; }
.wall-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.wall-tabs button { flex: 1; padding: 12px 0; font-weight: 700; color: var(--muted); position: relative; font-size: 15px; }
.wall-tabs button:hover { background: var(--hover-2); }
.wall-tabs button.on { color: var(--text); }
.wall-tabs button.on::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 4px; border-radius: 2px; background: var(--accent); }
.wall-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 18px; }
.wall-link { color: var(--accent); font-weight: 600; font-size: 13px; }
.wall-link:hover { text-decoration: underline; }
.wall .form-error { margin: 0 0 12px; }
/* free / taken name: green tick inside the field, red message + free proposals under it */
.w-okmark { position: absolute; right: 12px; top: 19px; width: 20px; height: 20px; fill: none; stroke: var(--up); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .15s; pointer-events: none; }
.field.good .w-okmark { opacity: 1; }
.field.good input { padding-right: 40px; }
.w-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.w-sug:empty { display: none; }
.w-sug button { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600; }
.w-sug button:hover { border-color: var(--accent); color: var(--accent); }
/* steps */
.wall-step { width: 420px; max-width: 100%; min-height: 560px; padding: 24px 28px; display: flex; flex-direction: column; box-sizing: border-box; }
.wall-step h2 { font-size: 23px; line-height: 28px; font-weight: 800; margin: 14px 0 6px; }
.w-steps { display: flex; gap: 6px; }
.w-steps i { width: 26px; height: 4px; border-radius: 2px; background: var(--line); }
.w-steps i.on { background: var(--accent); }
.w-sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 19px; }
.w-grow { flex: 1; min-height: 16px; }
.w-av { width: 84px; height: 84px; border-radius: 50%; margin: 10px 0 18px; cursor: pointer; display: block; }
.w-av span { width: 100%; height: 100%; border-radius: 50%; background: var(--hover-2); display: grid; place-items: center; border: 2px dashed var(--line); box-sizing: border-box; overflow: hidden; }
.w-av span.has { border: 0; }
.w-av img { width: 100%; height: 100%; object-fit: cover; }
.w-av svg { width: 28px; height: 28px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.w-av:hover span { border-color: var(--accent); }
.w-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.w-chip { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); text-align: left; }
.w-chip b { font-size: 14px; }
.w-chip span { font-size: 12px; color: var(--muted); }
.w-chip em { font-style: normal; }
.w-chip em.up { color: var(--up); } .w-chip em.down { color: var(--down); }
.w-chip:hover { background: var(--hover); }
.w-chip.on { border-color: var(--accent); background: rgba(29, 155, 240, .12); }
.w-chip.on b::after { content: " ✓"; color: var(--accent); }
.w-levels { display: grid; gap: 8px; }
.w-levels button { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.w-levels button:hover { background: var(--hover); }
.w-levels button.on { border-color: var(--accent); background: rgba(29, 155, 240, .1); }
.w-levels b { display: block; font-size: 14px; } .w-levels span { font-size: 12px; color: var(--muted); }
.w-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.w-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.w-pills button { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.w-pills button.on { border-color: var(--accent); color: var(--accent); background: rgba(29, 155, 240, .1); }
.w-rank { margin: 14px 0 0; font-size: 14px; }
.w-ladder { margin: 6px 0 4px; font-size: 12px; color: var(--muted); }
.w-ladder b { color: var(--text); }
.rank-pill { display: inline-block; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 700; line-height: 18px; color: var(--muted); background: var(--hover-2); vertical-align: 2px; margin-left: 6px; }
.rank-pill.trader { color: var(--accent); background: rgba(29, 155, 240, .12); }
.rank-pill.weteran { color: var(--warm); background: rgba(255, 173, 31, .14); }
.w-rank .rank-pill { margin-left: 4px; }
/* admin: invitations */
.inv-new { display: flex; gap: 10px; padding: 4px 16px 14px; }
.inv-new input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; outline: 0; }
.inv-new input:focus { border-color: var(--accent); }
.inv-row { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.inv-row code { font: 700 14px/20px ui-monospace, Consolas, monospace; letter-spacing: .04em; padding: 4px 8px; border-radius: 6px; background: var(--hover-2); }
.inv-row .who { flex: 1; min-width: 0; }
.inv-row .who b { display: block; }
.inv-row .who small { color: var(--muted); }
.inv-row.used code, .inv-row.revoked code { opacity: .55; }
.inv-row .btn { height: 30px; padding: 0 12px; font-size: 13px; }
@media (max-width: 760px) {
  .wall-auth { grid-template-columns: 1fr; width: 440px; }
  .wall-left { display: none; }
  .wall-right { padding: 20px 20px 24px; }
  .wall-step { min-height: 0; padding: 20px; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .left { width: 88px; }
  .left-inner { width: 88px; align-items: center; }
  .nav .lbl { display: none; }
  .nav button { padding: 12px; }
  .nav .badge { position: absolute; margin: -18px 0 0 18px; }
  .nav button { position: relative; }
  .right { width: 290px; margin-left: 24px; }
  /* narrow sidebar: account shows only the avatar / a person icon */
  .acct-btn .who, .acct-btn .dots { display: none; }
  .acct-btn { justify-content: center; padding: 8px; }
  .acct-guest .btn { display: none; }
  .acct-guest .acct-icon { display: grid; }
}
@media (max-width: 1020px) {
  .right { display: none; }
}
@media (max-width: 690px) {
  .left { display: none; }
  .center { width: 100%; border: 0; }
  .mobile-bar { display: flex; }
  .new-pill { top: 118px; }
  .topic-menu { top: 99px; right: 8px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: 53px; border-top: 1px solid var(--line);
            background: var(--glass-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .tabbar button { flex: 1; display: grid; place-items: center; color: var(--text); }
  .tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button.active svg { stroke-width: 2.6; }
  .center { padding-bottom: 54px; }
  .cimgs { grid-template-columns: repeat(2, 1fr); }
}
