/* News redesign: application shell and feed. Tokens only (design-system.css / themes.css); legacy home CSS is not loaded on these pages. */
body.nx{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-ui);font-size:15px;line-height:1.55}
.nx a{color:inherit;text-decoration:none}
.nx button{font:inherit}
.nx svg{flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nx-tilde{font-family:var(--font-mono);color:var(--accent);font-weight:500}
.nx-label{font-family:var(--font-mono);font-size:11px;letter-spacing:.9px;text-transform:uppercase;color:var(--muted-2)}

/* Header */
.nx-header{position:sticky;top:0;z-index:20;height:64px;display:flex;align-items:center;gap:24px;padding:0 32px;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--hairline)}
.nx-logo{flex:0 0 216px;display:inline-flex;align-items:center;height:40px}
.nx-logo-mark{display:block;width:46px;height:31px}
:root[data-theme="light"] .nx-logo-mark{content:url('/branding/mushimu-mark-light-80ad6cce30b08a46fe1f3e0ebb97c7fd.svg')}
.nx-search{position:relative;flex:1 1 auto;max-width:560px;height:40px;display:flex;align-items:center;gap:10px;padding:0 14px;border-radius:999px;background:var(--surface);border:1px solid var(--hairline);color:var(--muted-2);box-sizing:border-box}
.nx-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.nx-search svg{width:16px;height:16px;stroke-width:2}
.nx-search input{flex:1;min-width:0;background:transparent;border:0;outline:0;color:var(--text);font:inherit;font-size:14px;height:100%;box-shadow:none}
.nx-search input::placeholder{color:var(--muted-2)}
.nx-search .search-suggestions{position:absolute;left:0;right:0;top:46px;z-index:30;background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow-pop);overflow:hidden}
.nx-account{margin-left:auto;display:flex;align-items:center}
.nx-account .compact-account{display:flex;align-items:center;gap:8px}
.nx-account .header-create{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 18px;border-radius:999px;background:var(--text);color:var(--bg);font-weight:600;font-size:14px;border:0}
.nx-account .header-create svg{width:16px;height:16px;stroke-width:2.2}

/* Page grid */
.nx-page{max-width:1376px;margin:0 auto;padding:32px 32px 96px;display:flex;gap:40px;align-items:flex-start;box-sizing:border-box}
.nx-main{flex:1 1 640px;min-width:0;max-width:760px;margin:0 auto}
.skip-link{position:absolute;left:-9999px}.skip-link:focus{left:12px;top:12px;z-index:40;background:var(--surface);padding:8px 12px;border-radius:8px}

/* Rail */
.nx-rail{flex:0 0 216px;display:flex;flex-direction:column;gap:28px;position:sticky;top:88px;max-height:calc(100vh - 104px);overflow:auto}
.nx-rail-group{display:flex;flex-direction:column;gap:2px}
.nx-rail-group>a{height:40px;display:flex;align-items:center;gap:12px;padding:0 12px;border-radius:10px;color:var(--muted);font-weight:500;font-size:14px}
.nx-rail-group>a svg{width:18px;height:18px}
.nx-rail-group>a:hover{background:var(--surface-hover);color:var(--text)}
.nx-rail-group>a.is-active{background:var(--surface-2);color:var(--text);font-weight:600}
.nx-rail-group .nx-label{padding:0 12px 8px}
.nx-rail-group>.nx-rail-tag{height:34px;gap:8px;color:var(--text-soft);font-size:14px}
.nx-rail-group>.nx-rail-more{height:34px;gap:6px;color:var(--accent-link);font-size:13.5px;font-weight:600}
.nx-rail-more svg{width:14px;height:14px;stroke-width:2}
.nx-count{margin-left:auto;font-family:var(--font-mono);font-size:11px;padding:0 6px;border-radius:999px;background:var(--accent);color:var(--accent-ink)}
.nx-rail-links{display:flex;flex-direction:column;gap:6px;padding:0 12px;font-size:12.5px;color:var(--muted-2)}
.nx-rail-links a:hover{color:var(--text)}

/* Feed */
.nx-tabbar{display:flex;align-items:stretch;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--hairline)}
.nx-tabs{display:flex;gap:24px;border:0;padding:0;margin:0;background:transparent}
.nx-tabs a{height:48px;display:inline-flex;align-items:center;color:var(--muted);font-weight:500;font-size:14.5px;border-bottom:2px solid transparent}
.nx-tabs a:hover{color:var(--text)}
.nx-tabs a.is-active{color:var(--text);font-weight:600;border-bottom-color:var(--accent)}
.nx-updated{align-self:center;padding:0;line-height:1}
.nx-notice{margin:12px 0 0}
.nx-row{display:grid;grid-template-columns:minmax(0,1fr) 168px;grid-template-areas:"main thumb" "acts acts";column-gap:24px;row-gap:12px;padding:28px 0 20px;border-bottom:1px solid var(--hairline)}
.nx-row:not(:has(.nx-thumb)){grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "acts"}
.nx-row-main{grid-area:main;min-width:0;display:flex;flex-direction:column;gap:10px}
.nx-by{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;font-size:13px;color:var(--muted)}
.nx-by .user-identity{display:inline-flex;align-items:center;gap:6px;color:var(--text)}
.nx-by .identity-name{font-weight:600}
.nx-by .identity-handle{display:none}
.nx-source{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;font-size:12.5px;color:var(--muted)}
.nx-source b{color:var(--text-soft);font-weight:600}
.nx-rating{font-family:var(--font-mono);font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:var(--warning)}
.nx-row .content-copy{display:flex;flex-direction:column;gap:8px}
.nx-row .copy-line{margin:0}
.nx-row .post-link h2{margin:0;font-family:var(--font-serif);font-weight:600;font-size:26px;line-height:1.16;letter-spacing:-.6px;color:var(--text)}
.nx-row .post-link:hover h2{text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:4px;text-decoration-thickness:2px}
.nx-row .post-link p{margin:6px 0 0;font-size:13.5px;color:var(--muted)}
.nx-row .post-card-body{color:var(--text-soft);font-size:15px;line-height:1.55;max-width:62ch;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nx-row .post-card-body :is(h1,h2,h3,h4,ul,ol,blockquote,pre,img,video,iframe,figure,table){display:none}
.nx-row .post-card-body p{margin:0}
.nx-row .post-card-body p+p{display:none}
.nx-row .mushitag-chips{display:flex;flex-wrap:wrap;gap:4px 12px;margin:0}
.nx-row .mushitag-chips a{font-family:var(--font-mono);font-size:12px;color:var(--accent-link);background:transparent;border:0;padding:0}
.nx-row .mushitag-chips a:hover{text-decoration:underline}
.nx-thumb{position:relative;grid-area:thumb;width:168px;height:112px;border-radius:12px;overflow:hidden;border:1px solid var(--hairline);background:var(--surface-2);display:block}
.nx-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.nx-actions{grid-area:acts;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.nx-spacer{flex:1}
.nx-chip{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border-radius:999px;border:1px solid var(--border);color:var(--muted);font-size:13px;font-weight:600}
.nx-chip:hover{background:var(--surface-hover);color:var(--text)}
.nx-chip svg{width:16px;height:16px}
.nx-iconbtn{width:36px;height:36px;border-radius:50%;border:0;background:transparent;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.nx-iconbtn:hover{background:var(--surface-hover);color:var(--text)}
.nx-iconbtn svg{width:18px;height:18px}
.nx-actions .post-save-control,.nx-actions .post-save{display:inline-flex}

/* Useful / Not useful: the existing vote form restyled as one pill. Keeps its contract (votes.js, POST /vote/...). design-system.css sets
   !important on some of these, so the overrides below do too. */
.nx .vote-controls{display:inline-flex !important;align-items:stretch;gap:0;height:36px;min-height:36px;margin:0;padding:0;border:1px solid var(--border);border-radius:999px;overflow:hidden;background:transparent}
.nx .vote-controls button{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:0;height:auto;min-height:0;padding:0 12px;border:0 !important;border-radius:0;background:transparent !important;color:var(--muted);font-weight:600;font-size:13px;cursor:pointer;box-shadow:none !important}
.nx .vote-controls button:hover:not(:disabled){background:var(--surface-hover) !important;color:var(--text)}
.nx .vote-controls button.selected,.nx .vote-controls button:first-of-type.selected{background:var(--accent-soft) !important;color:var(--accent-link)}
.nx .vote-controls button:last-of-type.selected{background:var(--danger-soft) !important;color:var(--danger)}
.nx .vote-controls button:disabled{opacity:.6;cursor:default}
.nx .vote-controls button svg{width:16px;height:16px;stroke-width:2.2}
.nx .vote-controls output{display:inline-flex;align-items:center;justify-content:center;align-self:stretch;height:auto;min-height:0;line-height:1;min-width:34px;padding:0 2px;border-left:1px solid var(--border);border-right:1px solid var(--border);font-family:var(--font-mono);font-size:12.5px;font-weight:600;color:var(--text-soft)}
.nx .vote-controls .vote-error{display:none}

/* Guest account area and theme toggle in the header */
.nx-account .compact-auth{display:flex;align-items:center;gap:8px}
.nx-account .compact-auth a{display:inline-flex;align-items:center;height:40px;padding:0 16px;border-radius:999px;font-weight:600;font-size:14px;color:var(--text);border:1px solid var(--border)}
.nx-account .compact-auth a:hover{background:var(--surface-hover)}
.nx-account .compact-auth .register-link{background:var(--text);color:var(--bg);border-color:var(--text)}
.nx-account .theme-toggle-button{width:40px;height:40px;padding:0;border-radius:50%;border:0;background:transparent;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.nx-account .theme-toggle-button:hover{background:var(--surface-hover);color:var(--text)}
.nx-account .theme-toggle-button svg{width:20px;height:20px;stroke-width:1.8}
.nx-account .theme-toggle-button [data-theme-label]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Aside */
.nx-aside{flex:0 0 304px;display:flex;flex-direction:column;gap:32px;position:sticky;top:88px}
.nx-aside-title{margin:0 0 12px;font-family:var(--font-serif);font-size:21px;font-weight:600;letter-spacing:-.3px}
.nx-topics{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.nx-topic{display:inline-flex;align-items:center;height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--border);background:var(--surface-2);font-family:var(--font-mono);font-size:13px;color:var(--text-soft)}
.nx-topic.is-lg{height:34px;padding:0 14px;font-size:14px}
.nx-topic.is-xl{height:38px;padding:0 16px;font-size:15px}
.nx-topic:hover{border-color:var(--accent)}
.nx-aside-link{display:inline-flex;align-items:center;gap:6px;margin-top:14px;font-size:13.5px;font-weight:600;color:var(--accent-link)}
.nx-aside-link svg{width:14px;height:14px;stroke-width:2}
.nx-footer{margin:0;display:flex;flex-wrap:wrap;gap:4px 8px;font-size:12.5px;color:var(--muted-2)}
.nx-footer a:hover{color:var(--text)}
.nx-footer small{flex-basis:100%;margin-top:4px}
.nx-empty{padding:48px 0;text-align:left;color:var(--muted)}
.nx-empty strong{display:block;font-family:var(--font-serif);font-size:24px;color:var(--text);letter-spacing:-.4px;margin-bottom:6px}
.nx-more{padding:28px 0;text-align:center}
.nx-more .feed-more-link{color:var(--accent-link);font-weight:600}

/* Mobile bottom navigation */
.nx-mobile{display:none}

@media (max-width:1240px){.nx-aside{display:none}}
/* The aside streams in after a long feed: hold its column so the feed does not jump sideways when it arrives. */
body.home .nx-page:not(:has(.nx-aside))::after{content:"";flex:0 0 304px}
@media (max-width:1240px){body.home .nx-page:not(:has(.nx-aside))::after{display:none}}
@media (max-width:900px){
  .nx-rail{display:none}
  .nx-header{padding:0 12px 0 16px;gap:10px}
  .nx-logo{flex:0 0 auto;font-size:24px}
  .nx-page{padding:20px 0 96px;gap:0}
  .nx-main{max-width:none;width:100%}
  .nx-tabbar{padding:0 16px}
  .nx-updated{display:none}
  .nx-row{padding:20px 16px 14px;column-gap:16px}
  .nx-row .post-link h2{font-size:23px}
  .nx-row{grid-template-columns:minmax(0,1fr) 96px}
  .nx-thumb{width:96px;height:72px;border-radius:10px}
  .nx-account .header-create span{display:none}
  .nx-account .header-create{padding:0;width:40px;justify-content:center}
  .nx-mobile{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:25;background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(10px);border-top:1px solid var(--hairline);padding-bottom:env(safe-area-inset-bottom)}
  .nx-mobile a{flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--muted);font-size:10.5px;font-weight:500}
  .nx-mobile a svg{width:21px;height:21px;stroke-width:1.7}
  .nx-mobile a.is-active{color:var(--text);font-weight:600}
}
@media (max-width:560px){
  .nx-row,.nx-row:has(.nx-thumb){grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "thumb" "acts"}
  .nx-thumb{width:100%;height:auto;aspect-ratio:16/9}
}

/* Official account: a coral check instead of a text badge. */
.nx-verified{display:inline-flex;align-items:center;flex:0 0 auto;line-height:0}
.nx-verified svg{width:16px;height:16px;stroke:none}
.nx-verified-disc{fill:var(--accent)}
.nx-verified-tick{fill:none;stroke:var(--accent-ink);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* Trust ring: avatar inside an arc that fills with progress through the Muxi level. */
.nx-ring{display:inline-flex;flex:0 0 auto;width:30px;height:30px;padding:2px;box-sizing:border-box;border-radius:50%;background:conic-gradient(var(--accent) var(--ring,0%),var(--border) 0)}
.nx-ring .user-avatar{width:100%;height:100%;margin:0;border:2px solid var(--bg);box-sizing:border-box;border-radius:50%;overflow:hidden}
.nx-ring .user-avatar img{width:100%;height:100%;object-fit:cover}
.nx-ring.is-lg{width:44px;height:44px;padding:3px}

/* Badges over the cover: play for video, platform for embeds (X, Reddit, Imgur), +N for more photos. */
.nx-badges{position:absolute;left:8px;right:8px;bottom:8px;display:flex;align-items:center;gap:6px;pointer-events:none}
.nx-badge{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;background:rgba(10,13,17,.78);color:#F3EFE6;font-family:var(--font-mono);font-size:11px;font-weight:600;letter-spacing:.3px;backdrop-filter:blur(4px)}
.nx-badge-play{width:30px;height:30px;padding:0;justify-content:center;border-radius:50%;margin-right:auto}
.nx-badge-play svg{width:14px;height:14px;fill:currentColor;stroke:none;margin-left:2px}
.nx-badge-count{margin-left:auto}
.vote-count{margin-left:4px;font-family:var(--font-mono);font-size:11px;opacity:.7}
/* Signed-in account menu in the news header (layout formerly came from app-shell.css). */
.nx-header .account-popover{position:relative}
.nx-header .account-chip{height:40px;display:flex;align-items:center;gap:8px;padding:3px 10px 3px 4px;border-radius:999px;cursor:pointer;list-style:none;color:var(--text-soft)}
.nx-header .account-chip::-webkit-details-marker{display:none}
.nx-header .account-avatar{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;font-size:12px;font-weight:600;border-radius:50%}
.nx-header .account-chevron{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nx-header .account-popover-menu{position:absolute;right:0;top:48px;z-index:40;width:220px;padding:7px;border:1px solid var(--border);border-radius:13px;background:var(--surface);box-shadow:0 16px 38px rgba(0,0,0,.28)}
@media (max-width:720px){.nx-header .account-name,.nx-header .account-chevron{display:none}.nx-header .account-chip{padding:3px}}
.nx-header .notification-button{position:relative}
.nx-header .notification-dot{position:absolute;top:2px;right:2px;min-width:16px;height:16px;padding:0 4px;box-sizing:border-box;display:grid;place-items:center;border-radius:999px;font-size:10px;font-weight:700;line-height:1}
.nx-header .notification-dot:empty{display:none}
/* Save button inside news rows: same look as the other icon buttons, visible on mobile too. */
.nx .nx-actions .post-save-action,.nx article .post-save-action{width:36px;height:36px;min-width:36px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.nx article .post-save-action:hover{background:var(--surface-hover);color:var(--text)}
.nx article .post-save-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.nx article .post-save-action[aria-pressed="true"]{color:var(--accent-link)}
.nx article .post-save-action[aria-pressed="true"] svg{fill:currentColor}
/* Header must never overflow: the search shrinks, the account cluster keeps its size. */
.nx-header .nx-search{min-width:0}
.nx-header .nx-account{flex:none}
@media (max-width:420px){.nx-header .muxi-indicator{display:none}.nx-header .nx-search{min-width:96px}}
/* Light theme: news rows and threads keep tags as plain accent text (legacy light rules colour them by hue). */
:root[data-theme="light"] .nx-row .mushitag-chips>a,:root[data-theme="light"] .nx-thread .mushitag-chips>a{color:var(--accent-link) !important;background:transparent !important;border:0 !important;font-weight:400}
:root[data-theme="light"] .nx-row .mushitag-chips>a:hover,:root[data-theme="light"] .nx-thread .mushitag-chips>a:hover{background:transparent !important;text-decoration:underline}

/* Header search: one clean pill (the input inside carries no box of its own). */
.nx-header .nx-search input[type]:not([type="hidden"]){background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important;border-radius:0 !important;min-height:0;height:100%;appearance:none;-webkit-appearance:none}
.nx-header .nx-search input::-webkit-search-cancel-button{display:none}
/* Notifications: outline bell in the same round button as the rest of the header. */
.nx-header .notification-button{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--border);border-radius:50%;background:transparent;color:var(--text-soft)}
.nx-header .notification-button:hover{background:var(--surface-hover);color:var(--text)}
.nx-header .notification-button .bell-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.nx-header .notification-dot{top:-3px;right:-3px;border:2px solid var(--bg);background:var(--accent);color:var(--accent-ink)}
.nx-header .account-chip{border:0;background:transparent}
/* Phones: the search collapses to a round icon and opens over the whole header when tapped. */
@media (max-width:720px){
  .nx-header{position:sticky}
  .nx-header .nx-search{flex:0 0 40px;width:40px;max-width:40px;min-width:40px;padding:0;justify-content:center;gap:0;overflow:visible;border-color:var(--border)}
  .nx-header .nx-search svg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:18px;height:18px;pointer-events:none;z-index:1}
  .nx-header .nx-search input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}
  .nx-header .nx-search:focus-within{position:absolute;left:12px;right:12px;top:6px;width:auto;max-width:none;flex:none;height:44px;z-index:60;background:var(--surface);padding:0 16px 0 44px;justify-content:flex-start;box-shadow:0 0 0 9999px color-mix(in srgb,var(--bg) 82%,transparent)}
  .nx-header .nx-search:focus-within svg{left:22px;transform:translateY(-50%)}
  .nx-header .nx-search:focus-within input{position:static;opacity:1;cursor:text;font-size:16px}
  .nx-header .nx-search:focus-within .search-suggestions{top:52px}
  .nx-header .nx-account .compact-account,.nx-header .nx-account{gap:8px}
  .nx-header .muxi-indicator{display:none}
}
@media (max-width:720px){.nx-header .nx-search:not(:focus-within){margin-left:auto}}
.nx-header .account-chip{border:0 !important;box-shadow:none !important}
@media (max-width:720px){.nx-header .nx-account{margin-left:0}}

/* Search suggestions dropdown */
.nx-header .search-suggestions{max-height:min(70vh,520px);overflow-y:auto;padding:6px}
.nx-header .search-suggestions[hidden]{display:none}
.nx-header .suggestion-heading{padding:10px 12px 4px;font-family:var(--font-mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-2)}
.nx-header .suggestion-row{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:10px;color:var(--text);text-decoration:none}
.nx-header .suggestion-row:hover,.nx-header .suggestion-row[aria-selected="true"]{background:var(--surface-hover)}
.nx-header .suggestion-mark{flex:0 0 26px;height:26px;display:grid;place-items:center;border-radius:8px;background:var(--surface-2);color:var(--accent-link);font-family:var(--font-mono);font-size:13px}
.nx-header .suggestion-copy{min-width:0;display:flex;flex-direction:column;gap:2px}
.nx-header .suggestion-copy strong{font-size:14.5px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nx-header .suggestion-copy small{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:720px){.nx-header .nx-search:focus-within .search-suggestions{left:-12px;right:-12px;top:58px;border-radius:14px}}
@media (max-width:720px){
  .nx-header{gap:8px}
  .nx-header .compact-auth{gap:6px}
  .nx-header .compact-auth a{height:36px;padding:0 12px;font-size:13px;white-space:nowrap}
  .nx-header .theme-toggle-button{width:36px;height:36px;padding:0}
}
@media (max-width:420px){
  .nx-header{padding:0 10px 0 12px;gap:6px}
  .nx-header .nx-logo-mark{width:40px;height:27px}
  .nx-header .compact-auth a{padding:0 10px}
  .nx-header .nx-search{flex-basis:36px;width:36px;min-width:36px;max-width:36px;height:36px}
}

/* Useful / Not useful: icon-only everywhere (the words stay in aria-label and title). On phones the combined
   score is dropped to make room; the two counts already say it. */
.nx .vote-controls[id^="vote-post-"] .vote-label{display:none}
.nx .vote-controls[id^="vote-post-"] button{padding:0 14px}
.nx .vote-controls[id^="vote-post-"] .vote-count{margin-left:2px}
@media (max-width:560px){
  .nx .vote-controls[id^="vote-post-"] output{display:none}
  .nx .vote-controls[id^="vote-post-"] button{padding:0 11px;gap:5px}
  .nx .vote-controls[id^="vote-post-"] button:first-of-type{border-right:1px solid var(--border) !important}
  .nx .nx-actions{gap:6px 4px;flex-wrap:nowrap}
  .nx .nx-actions .nx-spacer{display:none}
  .nx .nx-actions .nx-iconbtn:first-of-type,.nx .nx-actions .post-save-control{margin-left:auto}
  /* only the first of the right-hand icons pushes right; the rest stay together */
  .nx .nx-actions .post-save-control ~ .nx-iconbtn,.nx .nx-actions .nx-iconbtn ~ .nx-iconbtn,.nx .nx-actions .nx-iconbtn ~ .post-save-control{margin-left:0}
}

/* Header controls: one family. Search, create, bell and avatar are all round and share one size. */
.nx-header{--nx-ctl:40px}
.nx-header .header-create,.nx-header .notification-button,.nx-header .account-chip,.nx-header .nx-search:not(:focus-within){box-sizing:border-box}
.nx-header .header-create{width:var(--nx-ctl);height:var(--nx-ctl);padding:0;justify-content:center;border-radius:50%}
.nx-header .header-create svg{width:18px;height:18px}
.nx-header .notification-button{width:var(--nx-ctl);height:var(--nx-ctl)}
.nx-header .account-chip{width:auto;min-width:var(--nx-ctl);height:var(--nx-ctl);padding:2px}
.nx-header .account-avatar,.nx-header .account-avatar img{border-radius:50% !important}
.nx-header .account-avatar{flex:0 0 calc(var(--nx-ctl) - 4px);width:calc(var(--nx-ctl) - 4px);height:calc(var(--nx-ctl) - 4px);border:1px solid var(--border);overflow:hidden}
@media (max-width:900px){
  .nx-header .nx-search:not(:focus-within){width:var(--nx-ctl);min-width:var(--nx-ctl);max-width:var(--nx-ctl);height:var(--nx-ctl);flex-basis:var(--nx-ctl)}
  .nx-header .nx-account,.nx-header .compact-account{gap:8px;align-items:center}
}
@media (max-width:420px){.nx-header{--nx-ctl:38px}}

/* Avatars: one shape everywhere (circle), matching the header controls */
.nx .user-avatar,.nx .person-avatar.user-avatar,.nx .account-avatar,.nx .mobile-profile-avatar,.nx .profile-avatar,.nx .embed-avatar,.nx .avatar-current,.nx .avatar-current img,.nx .avatar-settings-link img,.nx .avatar-crop-preview{border-radius:50% !important}
/* Avatar initials: centre the letter (and any img) inside the circle. */
.nx .user-avatar,.nx .person-avatar.user-avatar{display:inline-grid !important;place-items:center;line-height:1 !important;padding:0 !important;text-align:center;overflow:hidden}
.nx .user-avatar>span{display:block;line-height:1}
.nx .user-avatar>img{display:block;width:100%;height:100%;object-fit:cover}
/* Post votes: words + counts only when there are votes; the combined score is redundant. */
.nx .vote-controls[id^="vote-post-"] output{display:none}
.nx .vote-controls[id^="vote-post-"] button{gap:7px;padding:0 16px;border-radius:0}
.nx .vote-controls[id^="vote-post-"] button:first-of-type{border-right:1px solid var(--border) !important}
.nx .vote-controls[id^="vote-post-"] .vote-count{margin-left:0;font-size:12px;opacity:.75}
/* Account menu: one item per row, icon + label, on every width. */
.nx .nx-header .account-popover-menu{display:flex;flex-direction:column;gap:2px;width:min(260px,calc(100vw - 24px));padding:8px}
.nx .nx-header .account-popover-menu>a,.nx .nx-header .account-popover-menu>form{display:block;width:100%}
.nx .nx-header .account-popover-menu a,.nx .nx-header .account-popover-menu form button{display:flex !important;align-items:center;gap:12px;width:100%;min-height:40px;padding:8px 12px;border:0;border-radius:10px;background:transparent;color:var(--text);font:inherit;font-size:14.5px;font-weight:500;text-align:left;text-decoration:none;cursor:pointer;box-sizing:border-box}
.nx .nx-header .account-popover-menu a:hover,.nx .nx-header .account-popover-menu form button:hover{background:var(--surface-2)}
.nx .nx-header .account-popover-menu svg{width:18px;height:18px;flex:0 0 18px}
.nx .nx-header .account-popover-menu form{margin-top:4px;padding-top:6px;border-top:1px solid var(--hairline)}
.nx .nx-header .account-popover-menu form button{color:var(--muted)}
@media (max-width:720px){.nx .nx-header .account-popover-menu{position:fixed;left:auto;right:12px;top:60px}}
.nx .nx-header .account-popover-menu [data-theme-toggle]{display:flex !important;align-items:center;gap:12px;width:100%;min-height:40px;padding:8px 12px;font-size:14.5px;font-weight:500;color:var(--text);border-radius:10px}
.nx .nx-header .account-popover-menu [data-theme-toggle] svg{width:18px;height:18px;flex:0 0 18px}
.nx .nx-header .account-popover-menu [data-theme-toggle] [data-theme-label]{position:static;width:auto;height:auto;clip:auto;overflow:visible}
/* Feed thumbnail: larger and lined up with the source line / headline instead of floating beside the author. */
.nx-row:has(.nx-thumb){grid-template-columns:minmax(0,1fr) 200px}
.nx-row .nx-thumb{align-self:start;margin-top:46px;width:200px;height:134px}
@media (max-width:900px){
  .nx-row:has(.nx-thumb){grid-template-columns:minmax(0,1fr) 112px}
  .nx-row .nx-thumb{width:112px;height:84px;margin-top:46px}
}
@media (max-width:520px){
  .nx-row,.nx-row:has(.nx-thumb){grid-template-columns:minmax(0,1fr)}
  .nx-row .nx-thumb{width:100%;height:auto;aspect-ratio:16/9;margin-top:0}
}
/* The header create button is always a round icon; its label is screen-reader only at every width. */
.nx-header .header-create>span{position:absolute !important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.nx-header .header-create{position:relative;overflow:hidden;flex:0 0 var(--nx-ctl)}
/* X posts: fixed-width card, centred, never stretched to the column. */
.nx .post-social-x,.nx .post-social-x.x-embed-active{width:min(100%,550px) !important;max-width:100% !important;margin-inline:auto !important;box-sizing:border-box;background:transparent !important;border-radius:14px;overflow:hidden}
.nx .post-social-x iframe{display:block;width:100% !important;max-width:550px;margin:0 auto;border:0;border-radius:14px;color-scheme:normal}
.nx .x-embed-original{padding:8px 0;text-align:center;font-size:13px;color:var(--muted)}
/* Feed rows are teasers: media in the body is represented by the thumbnail, never rendered inline. */
.nx-row .post-card-body .post-video-embed,.nx-row .post-card-body .inline-rich-media,.nx-row .post-card-body .x-embed-original,.nx-row .post-card-body figure,.nx-row .post-card-body iframe{display:none !important}

/* Phones: bars slide away while reading down (nx-chrome.js). */
@media (max-width:900px){
  .nx-header,.nx-mobile{transition:transform .22s ease}
  body.nx-chrome-hidden .nx-header{transform:translateY(-100%)}
  body.nx-chrome-hidden .nx-mobile{transform:translateY(100%)}
}
@media (prefers-reduced-motion:reduce){.nx-header,.nx-mobile{transition:none}}

/* Topics lead the row: filled pills in the topic colour, so a post's subject reads before its title. */
.nx-row .mushitag-chips{gap:6px;margin:2px 0 0}
.nx-row .mushitag-chips a,:root[data-theme] .nx-row .mushitag-chips>a{display:inline-flex;align-items:center;min-height:0;padding:3px 11px;border-radius:999px;font-family:var(--font-mono);font-size:12.5px;font-weight:600;line-height:1.5;color:var(--tc,var(--accent-link)) !important;background:color-mix(in srgb,var(--tc,var(--accent-link)) 15%,transparent) !important;border:0 !important}
.nx-row .mushitag-chips a:hover,:root[data-theme] .nx-row .mushitag-chips>a:hover{text-decoration:none;background:color-mix(in srgb,var(--tc,var(--accent-link)) 26%,transparent) !important}
