/* Pulse — a microblogging interface.
 *
 * Structure of this file:
 *   1. tokens        — colour, type, the two accent tints
 *   2. reset & base
 *   3. layout        — the three columns and who owns the scroll
 *   4. left column   — navigation, Post button, account chip
 *   5. centre column — view chrome, composer, post cards, action bar
 *   6. profile       — banner, identity, metrics, tabbed timeline
 *   7. right column  — search, trends, who to follow
 *   8. utilities     — toast, empty states, scrollbars
 *   9. responsive & reduced motion
 */

/* ── 1. tokens ───────────────────────────────────────────────────────── */
:root {
  --bg: #000000;
  --bg-raise: #16181c;
  --bg-hover: #080808;
  --bg-hover-strong: #1d1f23;
  --bg-veil: rgba(0, 0, 0, 0.68);

  --border: #2f3336;
  --border-soft: #202327;

  --text: #e7e9ea;
  --text-dim: #71767b;

  --accent: #1d9bf0;
  --accent-press: #1a8cd8;
  --accent-tint: rgba(29, 155, 240, 0.12);

  --green: #00ba7c;
  --green-tint: rgba(0, 186, 124, 0.12);
  --pink: #f91880;
  --pink-tint: rgba(249, 24, 128, 0.12);

  --warn: #ffd400;
  --danger: #f4212e;
  --gold: #e2b719;

  /* The tick inside the verified seal is punched out in the page ground. */
  --seal-ink: var(--bg);

  --rail: 275px;
  --feed: 600px;
  --aside: 350px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── 2. reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  /* The page itself never scrolls — the centre column does. */
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, li, figure { margin: 0; padding: 0; }
ul { list-style: none; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon { display: block; flex: none; }

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 60;
  transform: translateY(-200%);
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-weight: 700;
}
.skip-link:focus { transform: none; }

/* ── 3. layout ───────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--feed)) var(--aside);
  justify-content: center;
  height: 100%;
  max-width: 1265px;
  margin: 0 auto;
}

.col { height: 100vh; min-height: 0; }

.col-nav { position: relative; }

/* The navigation block hugs the feed, not the window edge. */
.nav-inner {
  position: sticky; top: 0;
  display: flex; flex-direction: column;
  height: 100vh; width: 259px;
  margin-left: auto;
  padding: 2px 8px 12px;
}

.col-main {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.col-aside { overflow-y: auto; overscroll-behavior: contain; }
.aside-inner { padding: 0 0 48px 28px; }

/* ── 4. left column ──────────────────────────────────────────────────── */
.brand {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; margin: 2px 0 2px 2px;
  border-radius: 50%;
  transition: background-color 0.14s var(--ease);
}
.brand:hover { background: var(--bg-hover-strong); }
.brand-mark { display: block; }

.nav { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 18px;
  max-width: 100%;
  padding: 11px 22px 11px 12px;
  border-radius: 999px;
  transition: background-color 0.14s var(--ease);
}
.nav-item:hover { background: var(--bg-hover-strong); }
.nav-item.is-on .nav-label { font-weight: 800; }
.nav-item.is-on .icon { stroke-width: 2.4; }

.nav-icon { position: relative; display: block; }
.nav-label { font-size: 20px; letter-spacing: -0.01em; white-space: nowrap; }

.nav-badge {
  position: absolute; top: -3px; left: 13px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border: 2px solid var(--bg); border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 700; white-space: nowrap;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease), border-color 0.14s var(--ease), opacity 0.14s;
}

.btn-post {
  width: 100%; height: 52px; margin-top: 16px;
  background: var(--accent); color: #fff;
  font-size: 17px; letter-spacing: 0.01em;
}
.btn-post:hover { background: var(--accent-press); }
.btn-post:active { transform: scale(0.985); }
.btn-post-icon { display: none; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-press); }
.btn-sm { height: 36px; padding: 0 17px; font-size: 15px; }

.btn-outline { height: 36px; padding: 0 17px; border: 1px solid #536471; font-size: 15px; }
.btn-outline:hover { background: rgba(239, 243, 244, 0.1); }

.btn-solid { height: 36px; padding: 0 17px; background: var(--text); color: #0f1419; }
.btn-solid:hover { background: #d7dbdc; }

.btn-follow { height: 32px; padding: 0 16px; background: var(--text); color: #0f1419; font-size: 14px; }
.btn-follow:hover { background: #d7dbdc; }

/* Following → Unfollow: the label flips red on hover, as it should. */
.btn-follow.is-following, .btn-solid.is-following {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-follow.is-following:hover, .btn-solid.is-following:hover {
  background: rgba(244, 33, 46, 0.1);
  border-color: rgba(244, 33, 46, 0.4);
  color: var(--danger);
}
.btn-follow.is-following:hover .btn-follow-label,
.btn-solid.is-following:hover .btn-follow-label { visibility: hidden; }
.btn-follow.is-following:hover::after,
.btn-solid.is-following:hover::after { content: "Unfollow"; position: absolute; }
.btn-follow, .btn-solid { position: relative; }

.nav-spacer { flex: 1 1 auto; min-height: 12px; }

.account-chip {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px; border-radius: 999px; text-align: left;
  transition: background-color 0.14s var(--ease);
}
.account-chip:hover { background: var(--bg-hover-strong); }
.account-chip-meta { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.account-chip-name { display: flex; align-items: center; gap: 3px; font-weight: 700; font-size: 15px; }
.account-chip-name .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip-handle { color: var(--text-dim); font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.account-chip-more { color: var(--text); }

/* ── 5. centre column ────────────────────────────────────────────────── */
.view { display: block; }

.view-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg-veil);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.view-head-row { display: flex; align-items: center; gap: 20px; min-height: 53px; padding: 0 16px; }
.view-head-compact { border-bottom: 1px solid var(--border); }
.view-head-titles { flex: 1 1 auto; min-width: 0; }
.view-title { display: flex; align-items: center; gap: 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.view-sub { color: var(--text-dim); font-size: 13px; margin-top: 1px; }

.icon-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px; margin-left: auto; flex: none;
  border-radius: 50%; color: var(--text);
  transition: background-color 0.14s var(--ease);
}
.icon-btn:hover { background: var(--bg-hover-strong); }
.icon-btn-ring { border: 1px solid var(--border); width: 36px; height: 36px; margin-left: 0; }
.back-btn { margin-left: 0; margin-right: 0; }

.tabs { display: flex; border-bottom: 1px solid var(--border); }
.tab {
  flex: 1 1 0; min-height: 53px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-weight: 600;
  transition: background-color 0.14s var(--ease);
}
.tab:hover { background: var(--bg-hover-strong); }
.tab span { position: relative; display: inline-flex; align-items: center; height: 100%; padding: 0 2px; }
.tab.is-on { color: var(--text); font-weight: 800; }
.tab.is-on span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px; border-radius: 999px; background: var(--accent);
}

.sep-bar { height: 12px; background: var(--bg-raise); border-bottom: 1px solid var(--border); }

/* Composer ------------------------------------------------------------- */
.composer { display: flex; gap: 12px; padding: 8px 16px 4px; }
.composer-av { flex: none; padding-top: 4px; }
.composer-main { flex: 1 1 auto; min-width: 0; display: grid; }

.composer-input {
  width: 100%; min-height: 28px; margin: 12px 0 4px;
  /* Borderless by design: the field is the page, not a box on it. */
  background: none; border: 0; outline: none; resize: none; overflow: hidden;
  font-size: 20px; line-height: 24px; letter-spacing: -0.01em;
}
.composer-input::placeholder { color: var(--text-dim); }

.composer-audience {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.18s var(--ease), opacity 0.18s var(--ease);
}
.composer.is-active .composer-audience { max-height: 44px; opacity: 1; }
.audience-pill {
  display: inline-flex; align-items: center;
  margin: 4px 0 10px; padding: 4px 12px;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--accent); font-size: 14px; font-weight: 700;
}
.composer.is-active .composer-audience { border-bottom: 1px solid var(--border); }

.composer-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding-bottom: 4px;
}
.composer-tools { display: flex; align-items: center; gap: 2px; margin-left: -8px; }
.tool {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; color: var(--accent);
  transition: background-color 0.14s var(--ease);
}
.tool:hover { background: var(--accent-tint); }

.composer-meter { display: flex; align-items: center; gap: 12px; }

/* The character tracker ------------------------------------------------ */
.counter {
  display: inline-flex; align-items: center; gap: 8px;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}
.counter[data-state="empty"] { opacity: 0; transform: scale(0.6); }
.counter-ring { transform: rotate(-90deg); overflow: visible; }
.counter-track { fill: none; stroke: var(--border); stroke-width: 2; }
.counter-progress {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  transition: stroke-dashoffset 0.09s linear, stroke 0.14s var(--ease);
}
.counter-remaining { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-dim); }

.counter[data-state="warn"] .counter-progress { stroke: var(--warn); }
.counter[data-state="warn"] .counter-remaining { color: var(--warn); }
/* Past 280 the whole tracker goes red and Post is disabled in JS. */
.counter[data-state="over"] .counter-progress { stroke: var(--danger); }
.counter[data-state="over"] .counter-remaining { color: var(--danger); font-weight: 700; }
.counter[data-state="over"] { animation: nudge 0.24s var(--ease); }

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

.composer-divider { width: 1px; height: 31px; background: var(--border); }
.composer-submit:disabled { opacity: 0.5; cursor: default; }

/* Post card ------------------------------------------------------------ */
.timeline, .profile-panel { display: block; }

.post {
  display: flex; gap: 12px;
  padding: 12px 16px 4px;
  border-bottom: 1px solid var(--border);
  /* Cheapest possible win: skip layout/paint for cards outside the viewport. */
  content-visibility: auto;
  contain-intrinsic-size: auto 160px;
  transition: background-color 0.12s var(--ease);
}
.post:hover { background: var(--bg-hover); }
.post.is-fresh { animation: land 0.34s var(--ease); }

@keyframes land {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

.post-avatar { flex: none; }
.post-main { flex: 1 1 auto; min-width: 0; }

.avatar {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  user-select: none;
}
.avatar-mini { border: 2px solid var(--bg); }

.badge { display: inline-flex; flex: none; }
.badge-blue { color: var(--accent); }
.badge-gold { color: var(--gold); }

.post-head { display: flex; align-items: center; gap: 4px; min-width: 0; }
.post-author { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.post-name {
  font-weight: 700; letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.post-author:hover .post-name { text-decoration: underline; }
.post-handle, .post-sep, .post-time { color: var(--text-dim); white-space: nowrap; }
.post-handle { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.post-time:hover { text-decoration: underline; }

.post-more {
  display: grid; place-items: center;
  width: 30px; height: 30px; margin: -6px -6px -6px auto; flex: none;
  border-radius: 50%; color: var(--text-dim);
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.post:hover .post-more { color: var(--text-dim); }
.post-more:hover { background: var(--accent-tint); color: var(--accent); }

.post-context { color: var(--text-dim); font-size: 14px; margin: 1px 0 2px; }

.post-text {
  margin-top: 1px;
  font-size: 15px; line-height: 20px;
  overflow-wrap: anywhere;
}
.post-link { color: var(--accent); }
.post-link:hover { text-decoration: underline; }

.post-media {
  margin-top: 12px;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
}
.media-1 { aspect-ratio: 16 / 10; }
.media-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; aspect-ratio: 16 / 9; }
.media-tile { position: relative; width: 100%; height: 100%; }
.media-label {
  position: absolute; left: 16px; bottom: 14px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

/* Action bar ----------------------------------------------------------- */
.post-actions {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 440px; margin-top: 10px;
  color: var(--text-dim);
}
.post-actions-tail { display: flex; align-items: center; gap: 2px; }

.act {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--text-dim);
  transition: color 0.14s var(--ease);
}
.act-hit {
  display: grid; place-items: center;
  width: 34px; height: 34px; margin: -7px -4px;
  border-radius: 50%;
  transition: background-color 0.14s var(--ease);
}
.act-count {
  font-size: 13px; font-variant-numeric: tabular-nums;
  min-width: 1ch; margin-left: 6px;
}

.act-blue:hover, .act-blue.is-active { color: var(--accent); }
.act-blue:hover .act-hit { background: var(--accent-tint); }
.act-green:hover, .act-green.is-active { color: var(--green); }
.act-green:hover .act-hit { background: var(--green-tint); }
.act-pink:hover, .act-pink.is-active { color: var(--pink); }
.act-pink:hover .act-hit { background: var(--pink-tint); }

/* Active like and bookmark fill in; repost only recolours. */
.act-pink.is-active .icon-heart { fill: currentColor; }
.act-blue.is-active .icon-bookmark { fill: currentColor; }
.act-static { cursor: default; }

.act.is-burst .act-hit { animation: burst 0.32s var(--ease); }
@keyframes burst {
  0% { transform: scale(1); }
  38% { transform: scale(1.32); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.end-cap { padding: 28px 16px 64px; color: var(--text-dim); text-align: center; font-size: 14px; }

/* ── 6. profile ──────────────────────────────────────────────────────── */
.banner { width: 100%; aspect-ratio: 3 / 1; background-size: cover; }

.profile-bar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 12px 16px 0;
}
.profile-av { margin-top: -14.5%; }
.profile-av .avatar {
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.profile-actions { display: flex; align-items: center; gap: 8px; padding-top: 4px; }

.identity { padding: 12px 16px 12px; }
.identity-name {
  display: flex; align-items: center; gap: 4px;
  font-size: 20px; font-weight: 800; letter-spacing: -0.015em;
}
.identity-handle { color: var(--text-dim); margin-top: 1px; }
.identity-bio { margin-top: 12px; font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }

.pmeta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; color: var(--text-dim); }
.pmeta-item { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; }
.pmeta-item .icon { color: var(--text-dim); }
.pmeta-item a { display: inline-flex; align-items: center; gap: 4px; }

.metrics { display: flex; gap: 20px; margin-top: 12px; }
.metric { display: inline-flex; align-items: baseline; gap: 5px; color: var(--text-dim); font-size: 14px; }
.metric strong { color: var(--text); font-weight: 700; font-size: 14px; }
.metric:hover { text-decoration: underline; }

.followed-by { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--text-dim); font-size: 13px; }
.followed-faces { display: inline-flex; }
.followed-faces .avatar { font-size: 8px; }
.followed-faces .avatar + .avatar { margin-left: -6px; }
.followed-copy { min-width: 0; }

.tabs-wide { border-top: 0; }

.media-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  padding: 2px 0;
}
.grid-tile { position: relative; aspect-ratio: 1 / 1; }
.grid-tile .media-label { left: 10px; bottom: 8px; font-size: 13px; }

/* ── 7. right column ─────────────────────────────────────────────────── */
.search-wrap { position: sticky; top: 0; z-index: 10; padding: 6px 0 12px; background: var(--bg); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.search {
  width: 100%; height: 44px; padding: 0 16px 0 46px;
  background: var(--bg-raise); border: 1px solid transparent; border-radius: 999px;
  outline: none;
}
.search::placeholder { color: var(--text-dim); }
.search:focus { background: var(--bg); border-color: var(--accent); }
.search:focus + .search-icon, .search-wrap:focus-within .search-icon { color: var(--accent); }

.panel { background: var(--bg-raise); border-radius: 16px; margin-bottom: 16px; overflow: hidden; }
.panel-title { padding: 12px 16px 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.panel-copy { padding: 0 16px; color: var(--text-dim); font-size: 13px; line-height: 17px; }
#panel-premium .btn { margin: 12px 16px 16px; font-weight: 700; }
.panel-more { display: block; width: 100%; padding: 14px 16px; text-align: left; color: var(--accent); font-size: 15px; }
.panel-more:hover { background: var(--bg-hover-strong); }

.trend { position: relative; }
.trend-hit { display: grid; gap: 1px; padding: 10px 16px; transition: background-color 0.14s var(--ease); }
.trend-hit:hover { background: var(--bg-hover-strong); }
.trend-context, .trend-count { color: var(--text-dim); font-size: 13px; }
.trend-name { font-weight: 700; font-size: 15px; }
.trend-more {
  position: absolute; top: 8px; right: 10px;
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; color: var(--text-dim);
}
.trend-more:hover { background: var(--accent-tint); color: var(--accent); }

.trend-lg-list { display: block; }
.trend-lg { display: grid; gap: 2px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.trend-lg:hover { background: var(--bg-hover); }
.section-head { padding: 14px 16px 4px; font-size: 20px; font-weight: 800; }

.person { display: flex; align-items: center; gap: 12px; padding: 12px 16px; transition: background-color 0.14s var(--ease); }
.person:hover { background: var(--bg-hover-strong); }
.person-meta { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.person-name { display: flex; align-items: center; gap: 3px; font-weight: 700; }
.person-name .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-handle { color: var(--text-dim); font-size: 14px; }

.aside-footer { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 4px 16px 24px; color: var(--text-dim); font-size: 13px; }
.aside-footer a:hover { text-decoration: underline; }

/* ── 8. utilities ────────────────────────────────────────────────────── */
.notif-list { display: block; }
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); transition: background-color 0.12s var(--ease); }
.notif:hover { background: var(--bg-hover); }
.notif-icon { flex: none; }
.notif-pink { color: var(--pink); }
.notif-green { color: var(--green); }
.notif-blue { color: var(--accent); }
.notif-body { display: grid; gap: 8px; min-width: 0; }
.notif-faces { display: flex; }
.notif-copy { font-size: 15px; line-height: 20px; }
.notif-quote { color: var(--text-dim); font-size: 15px; line-height: 20px; }

.empty { padding: 48px 32px 64px; max-width: 400px; margin: 0 auto; }
.empty-title { font-size: 31px; font-weight: 800; letter-spacing: -0.02em; }
.empty-copy { margin-top: 8px; color: var(--text-dim); font-size: 15px; line-height: 20px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, 140%);
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 18px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 15px;
  opacity: 0; pointer-events: none;
  transition: transform 0.26s var(--ease), opacity 0.26s var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

.col-main, .col-aside { scrollbar-width: thin; scrollbar-color: #3a3f44 transparent; }
.col-main::-webkit-scrollbar, .col-aside::-webkit-scrollbar { width: 8px; }
.col-main::-webkit-scrollbar-thumb, .col-aside::-webkit-scrollbar-thumb { background: #2f3336; border-radius: 999px; }
.col-main::-webkit-scrollbar-thumb:hover, .col-aside::-webkit-scrollbar-thumb:hover { background: #3f4448; }

/* ── 9. responsive & reduced motion ──────────────────────────────────── */
@media (max-width: 1265px) {
  .app { grid-template-columns: var(--rail) minmax(0, var(--feed)) minmax(290px, var(--aside)); }
  .aside-inner { padding-left: 20px; }
}

/* Below this the labels stop fitting, so the rail becomes icons only. */
@media (max-width: 1100px) {
  .app { grid-template-columns: 88px minmax(0, var(--feed)) minmax(280px, var(--aside)); }
  .nav-inner { width: 72px; padding-left: 0; padding-right: 0; align-items: center; }
  .nav { align-items: center; }
  .nav-item { padding: 12px; gap: 0; }
  .nav-label { display: none; }
  .btn-post { width: 52px; height: 52px; align-self: center; }
  .btn-post-label { display: none; }
  .btn-post-icon { display: block; }
  .account-chip { justify-content: center; padding: 6px; }
  .account-chip-meta, .account-chip-more { display: none; }
}

/* With the right rail gone, the feed keeps its 600px measure and centres
   rather than stretching — long lines are the fastest way to lose a reader. */
@media (max-width: 1000px) {
  .app { grid-template-columns: 88px minmax(0, var(--feed)); }
  .col-aside { display: none; }
}

/* At phone width six actions and their tallies stop fitting on one row, so the
   counts clip. The analytics stub steps out first — it is the one action with
   nothing behind it — and the bookmark keeps its icon without its tally. */
@media (max-width: 620px) {
  .post-actions { max-width: none; }
  .post-actions [data-action="views"] { display: none; }
  .post-actions-tail [data-action="bookmark"] .act-count { display: none; }
  .act-count { margin-left: 4px; }
  .profile-av .avatar { width: 92px !important; height: 92px !important; font-size: 34px !important; }
  .banner { aspect-ratio: 3 / 1.2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
